FWGS / xash3d-fwgs

Xash3D FWGS engine.
1.51k stars 225 forks source link

Custom gfx.wad don't render #1736

Open DavidMacalister opened 1 month ago

DavidMacalister commented 1 month ago

I'm using Xash3D mobile and when I put titles.txt in Portuguese, the text is completely bugged Screenshot_20240721-030929

Related to #1735

Vladislav4KZ commented 1 month ago

Maybe you should use the Windows-1252 encoding in titles.txt

Or you have a broken gfx.wad, judging by the broken font.

Vladislav4KZ commented 1 month ago

To use the UTF-8 encoding in HUD text, you should enter in the console the hud_utf8 1 cvar.

But another bug will appear, described here: https://github.com/FWGS/xash3d-fwgs/issues/344

DavidMacalister commented 1 month ago

To use the UTF-8 encoding in HUD text, you should enter in the console the hud_utf8 1 cvar.

But another bug will appear, described here: #344

That didn't work, I'll try changing the txt to win 1252

Vladislav4KZ commented 1 month ago

Can you post your titles.txt here for testing?

DavidMacalister commented 1 month ago

Você pode postar seu titles.txt aqui para testes?

Sure here it is titles.txt

Vladislav4KZ commented 1 month ago

Here's how the text is displayed for me: t0a0_0000.png

Some letters have been replaced with Russian ones, since the xash has a built-in font with Cyrillic support, which replaces extra Latin letters.

Text encoding cvar values

cl_charset utf-8
con_charset cp1251
hud_utf8 0
a1batross commented 1 month ago

https://github.com/FWGS/xash-extras

wait, we don't have creditsfont for cp1252

Vladislav4KZ commented 1 month ago

Is there any way to override creditsfont using one from gfx.wad instead of fnt file?

Vladislav4KZ commented 1 month ago

Even putting gfx.wad in the custom folder doesn't override the font from the fnt file.

a1batross commented 1 month ago

It does the CRC32 check. If it's modified, engine will use modded gfx.wad, if not, it will replace fonts from extras.pk3.

a1batross commented 1 month ago

Honestly, I wish we've already used custom font renderer from mainui_cpp.

The only thing I need to do is rewrite it in C. It's not too hard, but every time I start, I dislike something and the whole thing gets scrapped.

DavidMacalister commented 1 month ago

Veja como o texto é exibido para mim: t0a0_0000.png

Algumas letras foram substituídas por letras russas, já que o xash tem uma fonte integrada com suporte ao cirílico, que substitui letras latinas extras.

Valores cvar de codificação de texto

cl_charset utf-8
con_charset cp1251
hud_utf8 0

I put in all the commands and it's still the same

Is it because I'm using a custom gfx.wad?

Vladislav4KZ commented 1 month ago

Is it because I'm using a custom gfx.wad

Yes, I'm using the original gfx.wad.

But for the above reason, some letters in the text are replaced by Cyrillic ones.

DavidMacalister commented 1 month ago

So will it be possible to add support for special Portuguese characters by default, without having to enter commands?

DavidMacalister commented 1 month ago

Is it because I'm using a custom gfx.wad

Yes, I'm using the original gfx.wad.

But for the above reason, some letters in the text are replaced by Cyrillic ones.

That really was it, put the original gfx.wad and it worked, just with the problem of the Cyrillic letters. Screenshot_20240723-130321

I was using a modified gfx.wad, which translated the loading texture into Portuguese

Vladislav4KZ commented 1 month ago

I was using a modified gfx.wad, which translated the loading texture into Portuguese

It's got a broken creditsfont.

@DavidMacalister Upload gfx.wad here, and rename the wad extension to txt, or put it in zip archive, as GitHub doesn't allow uploading wad files. I'll try to rebuild it with the original creditsfont and translated loading texture in Portuguese.

DavidMacalister commented 1 month ago

gfx.wad.zip

This translated wad I still think I'm going to tinker with it, then I'm trying to put the complete words

DavidMacalister commented 1 month ago

I'm also translating the Xash3D interface from mainui cpp, translating all possible texts and bnts_main.bmp, as well as the menus

Vladislav4KZ commented 1 month ago

@DavidMacalister I installed your gfx.wad and titles.txt with Windows-1252 encoding, and didn't see any problems with the text displaying as in your first screenshot.

The Portuguese loading texture also works.

t0a0_0000.png

Vladislav4KZ commented 1 month ago

Only some of the Latin letters used in Portuguese are missing.

DavidMacalister commented 1 month ago

Hmm, strange, the translated gfx.wad works normally on the PC, it just bugs on my cell phone

About the missing letters, it happens to me too, the first case only happens when I have the translated gfx.wad and titles.txt

DavidMacalister commented 1 month ago

I created 2 issues to differentiate the mobile and PC versions, on the PC everything works normally, the only thing is without the Latin letters, or keep the characters changed

Vladislav4KZ commented 1 month ago

Hmm, strange, the translated gfx.wad works normally on the PC, it just bugs on my cell phone

I have it working well on both my phone and PC.

DavidMacalister commented 1 month ago

Strange, maybe it's Xash's version, or something else