Using Unicode or foreign encodings in AGS

Started by , Thu 30/11/2006 01:31:33

Previous topic - Next topic

Crybaby

I would like to know if it's possible to use Unicode or foreign encodings in stuff like dialogue, the statusbar (in LucasArts games), and so on. For limited character sets like Cyrillic and Hebrew I could get away with using a special font, but not Hanzi or Kana.

I also wanted to know some things about functions. Can they return other data types besides integer and how? Why do I get an error when I pass a string literal to a function that takes a string unless I change the parameter to const string? Well, I know why I get an error, but is there a way around this limitation?

Gilbert

About the unicode part: no, it's not possible at the moment, you can only use up to the 256 characters using ASCII codes.

Khris

It's possible to return floats, chars or bools, afaik.

Code: ags
bool isAsmallerThanB(int a, int b) {
  if (a<b) return true;
  return false;
}

if (isAsmallerThanB(3,8)) Display("3 is smaller than 8.");


Using new-style strings should work:

Code: ags
function FaceSay(String text) {   // capital S
  player.FaceLocation(320, 3000);
  player.Say(text);
}

FaceSay("Hey, you there!");

SMF spam blocked by CleanTalk