From: Ludwig N. <lud...@gm...> - 2006-01-21 17:48:38
|
Tomasz Kalkosinski wrote: > Q3 and Q4 uses dash (^) sign and upcoming characters to acquire > colors and special effects, e.g. ^1 is red. XQF displays names > without simple combinations - ^4, ^2 etc. But in most-widely used > OSP (and other mods derived from it I guess) you can set some > speical effects with ^B, ^N and RGB color with ^XRRGGBB. It is > handled wrong with XQF. I wrote a patch (see below) that escapes > these characters well. > > In Q4 - there are other combinations. There are simple ^3, ^7 etc. > but there are also two others to cut out. ^cRGB is a custom color > and ^ixxx generates an icon 'xxx' (e.g. ^iw05 is an icon for > weapon 5 - RL). Method q4_unescape cuts them out. Patch also > unescapes clan names (but still with q3_unescape method since > there is no special method for parsing Q4 player). Thanks for the explanation, I was not aware of that. > I guess there should be methods specialised for Q4 to use > q4_unescape, or Q3 methods with added bool flag wheather is it Q3 > or Q4 name handling method. It's up to lead developers concern. ack > Another thing to note is that server names uses combinations with > dashes too - ^1Red ^9OSP ^4Server. It's because there are seen > colorful in in-game browser and All Seeying Eye supports them too. > It would be nice to unescape server names too. XQF does that already. > Last thing is a question to developers - does GTK/GTK2 include > methods or metadata to display colorful entries? Something like: > ^1Red ^9OSP ^4Server can become <red>Red</red><orange>OSP</orange> > <blue>Server</blue> and can be displayed with colors on list I > see? If so - I can provide a patch for conversions so we can see > players' names colorised. It can be done with GTK2 although I suppose the serverlist could become rather slow. Anyways, you'd need to port the gtkclist based interface to gtktreeview first which is a lot of unpleasant work. > Ok here goes the patch and explanations. > > 1. QStat has flag '-carets'. If not included - QStat cuts out > every '^.' characters from Q3/Q4 players. It's wrong, since it > cannot cut out ^xRRGGBB (Q3) nor ^cRGB (Q4) - it cuts out only ^x > and ^c leaving numbers as 'artifacts' in names. We need to include > '-carets' flag - so we can handle unescape by ourselves. Needs to be fixed in qstat as well. The patch you included for xqf is reversed. Use quilt or cvs diff to create patches. cu Ludwig -- (o_ Lud...@gm... //\ V_/_ PGP Key ID: FF8135CE |