Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
Change chart colours
by 7th_zorro. 05/11/24 09:25
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
3 registered members (AndrewAMD, Akow, 1 invisible), 1,417 guests, and 12 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 3 of 3 1 2 3
Re: Unicode issue [Re: BES] #231001
10/11/08 11:56
10/11/08 11:56
Joined: Sep 2007
Posts: 158
Guangzhou China
bomber Offline
Member
bomber  Offline
Member

Joined: Sep 2007
Posts: 158
Guangzhou China
Originally Posted By: BES
Thanks so much for the reply bomber! Are you loading your text from an external file, or are you able to type in Chinese strings in SED with the Chinese version of windows?

Both, the magic and weapons names are from external files, the chat and reminder text are in Chinese strings in SED


"I don't know what the facts are but somebody's certainly going to sit down with him and find out what he knows that they may not know, and make sure he knows what they know that he may not know."
————Donald Rumfeld
Re: Unicode issue [Re: bomber] #231387
10/14/08 07:48
10/14/08 07:48
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
I'm beginning to believe that this isn't possible with 3DGS...no one can provide a working example. Would anyone be interested in being paid to provide a working script which successfully implements a unicode font into 3d game studio?

Re: Unicode issue [Re: DavidLancaster] #231959
10/18/08 09:13
10/18/08 09:13
Joined: Sep 2007
Posts: 158
Guangzhou China
bomber Offline
Member
bomber  Offline
Member

Joined: Sep 2007
Posts: 158
Guangzhou China
ok I'll try!


"I don't know what the facts are but somebody's certainly going to sit down with him and find out what he knows that they may not know, and make sure he knows what they know that he may not know."
————Donald Rumfeld
Re: Unicode issue [Re: bomber] #232309
10/21/08 06:26
10/21/08 06:26
Joined: Nov 2004
Posts: 862
Australia
DavidLancaster Offline
User
DavidLancaster  Offline
User

Joined: Nov 2004
Posts: 862
Australia
Please let us know how you get on Bomber. Thank you so much!

Re: Unicode issue [Re: DavidLancaster] #233470
10/28/08 23:54
10/28/08 23:54
Joined: Jul 2006
Posts: 40
North Europe
D
DeepReflection Offline
Newbie
DeepReflection  Offline
Newbie
D

Joined: Jul 2006
Posts: 40
North Europe
Hi,

I tried and I thought this should have done the trick really,

This is the output from Notepad.




Now from this text code I extracted out of the saved file with hexedit, translated that to decimal, fiddled with a char array and put that to screen. Bad result, abc was shown nicely though whistle

Some notes:

First notepad embedding some switchcode in the file, I presume this tells a similar application that open this file to use SimHei UTF font. Game Studio seems not to care for this.

Secondly notice that each advanced character is built of three bytes with a start byte (character) that tells the application to sum the next two to the actual character you want to show.

Actually I think JCL or someone of the team have to step in and tell what command codes we have to inject to get the wanted characters shown.


Code:
////////////////////////////////////////////////////////////////////
#include <acknex.h>
#include <default.c>
////////////////////////////////////////////////////////////////////

// Font with asian characters
FONT* some_font = "SimHei#25b"; // true type, WhatEver, bold, size = 25

STRING* aloha = str_create("#100");

STRING* aloha = ""; // Nullify string, TEXT* crack with non initialized STRING*

// Small text saved with notepad and SimHei font
//               switch?    a, b, c,       asian,      asian,       a, b, c,
// HEX output   ef,bb,bf,	 61,62,63,    e4,bb,a7,	   e4,bc,bf,     61,62,63,  
// Decimal    239,187,191,  97,98,99,  228,187,167,  228,188,191,   97,98,99,

char test[30] = { 239,187,191,97,98,99,228,187,167,228,188,191,97,98,99};

char endtest[30] = { '|',' ','A','n','y',' ','L','u','c','k','?'};

TEXT* greetings_txt =
{
    pos_x = 150;
    pos_y = 250;
    font = some_font;
    string (aloha);
    flags = VISIBLE;
}

////////////////////////////////////////////////////////////////////
function main()
{
    str_cpy(aloha, test); 
    video_mode = 6;
    screen_color.blue = 150;
    wait (-3);
    str_cat(aloha, endtest); 
}







Last edited by DeepReflection; 10/29/08 00:01. Reason: not showing pic

Whoever has the gold makes the rules.
Re: Unicode issue [Re: DeepReflection] #233507
10/29/08 09:36
10/29/08 09:36
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
The method above has nothing to do with unicode. It just displays ASCII characters.

Although Unicode is not officially supported by Gamestudio, maybe there are some tricks to display unicode text nevertheless - if so, I don't know them. However, you can of course display foreign characters by using a foreign character ASCII Truetype font.

Re: Unicode issue [Re: jcl] #233632
10/29/08 17:33
10/29/08 17:33
Joined: Jul 2006
Posts: 40
North Europe
D
DeepReflection Offline
Newbie
DeepReflection  Offline
Newbie
D

Joined: Jul 2006
Posts: 40
North Europe
Oki, that mean GameStudio functions only handle single byte characters between 0-255 (8 bit ASCII), correct?

And anyone that want to use a TrueType font with special characters have to use the country specific one or fork a own one and place the wanted characters in position 0-255 in that font library?


Whoever has the gold makes the rules.
Re: Unicode issue [Re: DeepReflection] #233759
10/30/08 12:36
10/30/08 12:36
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Strings can contain 8 bit or 16 bit characters. The latter may be a backdoor for some unicode tricks by users that I don't know. However, the DirectX functions that display the TEXT object are indeed set up to interpret strings as single byte ASCII characters. Therefore, you'll need a country specific font for displaying Greek, Cyrillic or other special characters.

Re: Unicode issue [Re: jcl] #234010
10/31/08 16:57
10/31/08 16:57
Joined: May 2008
Posts: 123
B
BES Offline OP
Member
BES  Offline OP
Member
B

Joined: May 2008
Posts: 123
Hi jcl. Thanks for chiming in on the conversation. Can you direct me to the DirectX functions that are responsible for rendering the TEXT object? Perhaps I may be able to look at the code and see if there's a workaround. If Bomber can show chinese, we at least know that strings can contain 16 characters. Thanks.

Page 3 of 3 1 2 3

Moderated by  old_bill, Tobias 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1