Community

AGI Programming => AGI Community How To's & Tutorials => Topic started by: AGKorson on March 07, 2020, 02:30:02 PM

Title: AGI CAN support Extended Characters
Post by: AGKorson on March 07, 2020, 02:30:02 PM
I've been experimenting more with the use of the StringHack  (http://sciprogramming.com/community/index.php?topic=1870.0)to improve AGI's functionality. For those of you who wish to use extended characters in messages (for example, French or Spanish), I have written a logic that will modify how AGI displays characters so that the extended characters display correctly.

All you need to do is add the logic (see next post, below) to your game, and run it once when the game first loads. After that, all characters, including extended characters will display correctly in print() messages.

Here's some sample output to see it in action:
(https://i.imgur.com/MFCsBV4.png)

(https://i.imgur.com/twZbZyO.png)

(https://i.imgur.com/x3cbkcT.png)

A couple of caveats:
Finally, WinAGI v1.2.7 is the only dev environment that supports the use of extended characters while authoring a game. Use CTRL+INSERT to display a popup window in the logic editor to insert any extended character. You can also use "\x" codes to insert hexadecimal characters (which is what I typically do when using string hacks; it's just easier to read and manage code).
Title: Re: AGI CAN support Extended Characters
Post by: AGKorson on March 07, 2020, 04:55:55 PM
It was much easier than I thought to include character 80h. It only takes a couple tweaks to have AGI use character ffh (which is nonprintable anyway) instead of character 80h to manage shading and inverting. Here's a revised logic that does that.

So ALL printable characters are now available ALL the time for ALL foreground/background/shading combos.

Enjoy.
Title: Re: AGI CAN support Extended Characters
Post by: Kawa on March 08, 2020, 05:27:43 AM
That's a very interesting implementation. My hat's off to you.