[Scrymud] CVS Commit Info

Ben Greear greear at WANfear.com
Thu Jan 3 18:30:03 PST 2002


uid=500(eroper) gid=500(eroper) groups=500(eroper),10(wheel),16(irc),56(spice),57(icecast),100(users),101(roper),152(scrydev),153(brainkick),156(syex),158(asylum),159(vearth),160(suckdev),508(scr)
ScryMUD/mud/grrmud/server misc.cc,1.39,1.40 misc.h,1.21,1.22
Thu Jan  3 18:21:24 PST 2002
Update of /home/cvs/scry/ScryMUD/mud/grrmud/server
In directory ns1.wanfear.com:/tmp/cvs-serv8789

Modified Files:
	misc.cc misc.h 
Log Message:
Okie Dokie, more cool color stuffos.

New function added to misc.cc & misc.h
String *colorize(char *message, critter &pc);

This nifty little function will be called (currently commented out) from
show() in misc.cc It will determine whether or not ANSI is the appropriate
mechanism to deliver color from the color codes (see previous CVS log for
details) and if so, do so, otherwise it will strip all color codes. 

This function is 100% functional and works like a charm. 

On the downside (of course there had to be bad news, that's why the code
(currently the 2 applicable lines in misc.cc) are commented out at the moment.

So the bad news:

Currently whenever say, yell, auction, critters, objects, etc. are colorized
in the rest of the Scry code in about 88 independant locations it sticks ANSI
codes directly in the text sent to show(). It does this once at the beginning
of an "output-type section". In order to prevent user initiated color
bleeding, colorize will reset to default ANSIless display at every encounter
of a newline.

So now I'm facing a design decision.

1] Make all yell, shout, say, etc. color changes happen at the beginning of
   every show()'ed string.
2] Do the above but instead of embedding raw ansi, have them use the new color
   code scheme in addition. I.E. to embed blue instead of passing show() a
   long escape sequence embed ^b for dark blue or ^B for light blue. The other
   advantage to this is that now instead of adding a million more keywords
   that the color command can accept, I just allow it to take as a parameter
   the MUD-WIDE ^ color codes for foreground and & color codes for background.

Either way there's a bit more work to be done but I think I've come up with a
good compromise to allow colors everywhere w/o the risk of severe bleeding.

Let me know what ya'll think.

-- Khaav




More information about the ScryMUD mailing list