 |
The TinTin++ message board
|
 |
| View previous topic :: View next topic |
| Author |
Message |
Slysven
Joined: 10 Apr 2011 Posts: 260 Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK
|
Posted: Tue Apr 10, 2012 3:05 pm Post subject: BUG: #MAP LEGEND not workable with #MAP FLAG VTGRAPHICS? |
|
|
Looking through the mapper code I spotted, I think, a problem with the #MAP LEGEND command, if #MAP FLAG VTGRAPHICS is set. If that flag IS set then the character used is from an alternative characterset which is selected by "ESC[12m" = select 2nd alternate character set and then reset afterwards by "ESC[10m" = select default character set. However in this command the display of the characters to use is NOT so selected. I believe that on an original VT100 (possible, but then again, possible NOT this particular terminal) this gives access to a small set of "line-drawing" characters not present in the default set. | Code: | DO_MAP(map_legend)
{
arg = sub_arg_in_braces(ses, arg, arg1, GET_ALL, SUB_VAR|SUB_FUN);
if (*arg1 == 0)
{
tintin_printf2(ses, "#MAP: Current legend: %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s",
ses->map->legend[0], ses->map->legend[1], ses->map->legend[2],
ses->map->legend[3], ses->map->legend[4], ses->map->legend[5],
ses->map->legend[6], ses->map->legend[7], ses->map->legend[8],
ses->map->legend[9], ses->map->legend[10], ses->map->legend[11],
ses->map->legend[12], ses->map->legend[13], ses->map->legend[14],
ses->map->legend[15], ses->map->legend[16]);
}
else
{
create_legend(ses, arg1);
}
}
| I think this can be fixed by changing to: | Code: | DO_MAP(map_legend)
{
arg = sub_arg_in_braces(ses, arg, arg1, GET_ALL, SUB_VAR|SUB_FUN);
if (*arg1 == 0)
{
if (HAS_BIT(ses->map->flags, MAP_FLAG_VTGRAPHICS))
{
tintin_printf2(ses, "#MAP: Current legend: \033[12m%s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s\033[10m",
ses->map->legend[0], ses->map->legend[1], ses->map->legend[2],
ses->map->legend[3], ses->map->legend[4], ses->map->legend[5],
ses->map->legend[6], ses->map->legend[7], ses->map->legend[8],
ses->map->legend[9], ses->map->legend[10], ses->map->legend[11],
ses->map->legend[12], ses->map->legend[13], ses->map->legend[14],
ses->map->legend[15], ses->map->legend[16]);
}
else
{
tintin_printf2(ses, "#MAP: Current legend: %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s %s",
ses->map->legend[0], ses->map->legend[1], ses->map->legend[2],
ses->map->legend[3], ses->map->legend[4], ses->map->legend[5],
ses->map->legend[6], ses->map->legend[7], ses->map->legend[8],
ses->map->legend[9], ses->map->legend[10], ses->map->legend[11],
ses->map->legend[12], ses->map->legend[13], ses->map->legend[14],
ses->map->legend[15], ses->map->legend[16]);
}
}
else
{
create_legend(ses, arg1);
}
} |
However, further reading has possibly suggested that the ability to select an alternative font in this manner is not appiicable when a Unicode iso10646 characterset is in use (#CONFIG {CHARSET} {UTF-8} anyone???).
By the way, is ANYONE actually using the "alternative characterset - VTGRAPHICS" mode, please, if you are, let us know here?  |
|
| Back to top |
|
 |
Scandum Site Admin
Joined: 03 Dec 2004 Posts: 3281
|
Posted: Tue Apr 10, 2012 7:03 pm Post subject: |
|
|
| Thanks, I'll fix that. I think UTF-8 offers the full drawing table somewhere, I guess I should document how to create a legend for it. |
|
| Back to top |
|
 |
Slysven
Joined: 10 Apr 2011 Posts: 260 Location: As "Jomin al'Bara" in WoTMUD or Wiltshire, UK
|
Posted: Tue May 08, 2012 3:17 pm Post subject: |
|
|
With regard to the defaults that may once have been used for the VTGRAPHICS option I noted this unused default at the begining of the mapper.c file - I have found out what I think each was intended to be in the DEC VT220 Special "VT100" GL character set from the VT100.net website Table2-4 EXCEPT for the 247 decimal value, what is THAT code supposed to be, it looks as though it is the "oe" dipthong, but it is used for the single direction exits....? | Code: | unsigned char map_palet1[] = {126,247,247,109,247,120,108,116,247,106,113,118,107,117,119,110, 88};
/*I have decode these as follows:
DEC Special Character set, VT220 character codes: 0-127 are in GL set
88 = Lowercase 'x'
106 = NW lines
107 = SW lines
108 = ES lines
109 = NE lines
110 = NESW lines
113 = Mid-level Line
116 = NES lines
117 = NSW lines
118 = NEW lines
119 = ESW lines
120 = NS lines
126 = Center Dot
247 = unknown
*/ | By rights of course, these codes should be loaded in at the point of a #MAP CREATE command instead of those in the | Code: | | unsigned char map_palet0[] | set. However, if the user wants a map with the #MAP FLAG VTGRAPHICS flag asserted, by the time they could set that the legend characters have already been set. I suspect the only way around this would be to allow some of the MAP_FLAG values to be set BEFORE a map is created... |
|
| Back to top |
|
 |
|
|
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
|
TinTin++ Homepage
Powered by phpBB © 2001, 2002 phpBB Group
|