TinTin++ Mud Client The TinTin++ message board

 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
TinTin++ Mud Client

Map symbols

 
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests
View previous topic :: View next topic  
Author Message
wont



Joined: 23 May 2008
Posts: 13

PostPosted: Sat May 31, 2008 5:46 am    Post subject: Map symbols Reply with quote

If I understood correctly, it is only possible to use a single character as a map symbol.
However, nowadays most (?) terminals use UTF-8, so it'd be really cool if it were possible to use a string instead of a character. This would make possible using Unicode line art (at least I think so).

http://en.wikipedia.org/wiki/Box_drawing_characters
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat May 31, 2008 9:26 am    Post subject: Reply with quote

#map set roomsymbol uses a string so color can be added as well.

#map legenda uses characters, not sure how well tintin deals with unicode though.
Back to top
View user's profile Send private message Send e-mail
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sat May 31, 2008 8:41 pm    Post subject: Reply with quote

I looked into it.

To enable UTF-8 on Linux (might only work on some terminals) you'd use: \e%G and \e%@ to return to Latin-1.

So to print the cent sign you'd use: #showme {\e%G\xC2\xA2\e%@}

It's easier to switch in and out of vt100 graphics mapping using \e(0 and \e(B to return to Latin-1.

For example:

#forall {0 1 2 3 4 5 6 7 8 9 A B C D E F} {#forall {0 1 2 3 4 5 6 7 8 9 A B C D E F} {#showme (&0&&9) \e(0\x&0&&0\e(B}}

But it tends to differ a lot between terminals.

Did you try the manual suggestion? #map flag vtgraphics and setting your legenda to: 250 223 222 200 220 186 201 204 221 188 205 202 187 185 203 206 246

The vtgraphics setting toggles the \e[12m code for drawing, and \e[10m to turn it off.
Back to top
View user's profile Send private message Send e-mail
wont



Joined: 23 May 2008
Posts: 13

PostPosted: Sun Jun 01, 2008 2:33 am    Post subject: Reply with quote

Excuse me, but I fail to understand.

Why should I set my terminal to UTF-8? It is always switched to it.
And yes, #showme {\e%G\xC2\xA2\e%@} works, but then #showme {\xC2\xA2} works equally well.

Your #forall command produces the usual printable ASCII and not much else (all the higher characters show as boxes or something weird, depending).

In contrast, #forall {8 9 A B} {#forall {0 1 2 3 4 5 6 7 8 9 A B C D E F} {#showme \xE2\x94\x&0&&0}} shows me a nice selection of weird line-art characters (not all there is).

As you can see, my preferred solution is accepting multibyte characters in legenda, not mucking around with terminal settings.
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Sun Jun 01, 2008 8:26 pm    Post subject: Reply with quote

Alright. The legenda uses decimal values as the input rather than escape codes, but I'll see what I can do.
Back to top
View user's profile Send private message Send e-mail
wont



Joined: 23 May 2008
Posts: 13

PostPosted: Sun Jun 01, 2008 11:13 pm    Post subject: Reply with quote

For the user it'd be easiest if the user could just paste the symbols in, not write escape codes.

(currently it is possible to do #map color ╢. It looks and is buggy, but serves as a demonstration.)
Back to top
View user's profile Send private message
Scandum
Site Admin


Joined: 03 Dec 2004
Posts: 3770

PostPosted: Mon Jun 02, 2008 10:32 am    Post subject: Reply with quote

Pasting shouldn't be an issue.

The following seems to do the trick for displaying UTF-8 box drawing characters:

#forall {9 A} {#forall {0 1 2 3 4 5 6 7 8 9 A B C D E F} {#showme \xE2\x95\x&0&&0}}

I'm not sure about the best character for a no exit room and the player character, and decent characters for the n e s w exits are lacking as well.

So far I came up with the following:

#map legenda ▪ █ █ ╚ █ ║ ╔ ╠ █ ╝ ═ ╩ ╗ ╣ ╦ ╬ ▩

I uploaded a beta with the multi-byte legenda at: http://tintin.sf.net/download/tintin-beta.tar.gz
Back to top
View user's profile Send private message Send e-mail
Display posts from previous:   
Post new topic   Reply to topic    The TinTin++ message board Forum Index -> Feature Requests All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads Get TinTin++ Mud Client at SourceForge.net. Fast, secure and Free Open Source software downloads
TinTin++ Homepage

Powered by phpBB © 2001, 2002 phpBB Group