--- Robin Bjorklund <[EMAIL PROTECTED]> wrote: > Greetings, > > I've been reading through this list to find the most efficient way of > handling colors. I saw that some guys prefer to put it into > write_to_descriptor the lowest output level, while some others put it into > write_to_buffer and lope's color code is put into a even high level of > output I think? What are the benefits of putting it into a lower or higher > level of output? I also noticed not many have put it into the lowest level > of output write_to_descriptor? I wonder why is there a reason for this?
It's all a matter of what you want your "color code" to do. There isn't really a difference between putting the color translation into write_to_buffer vs. write_to_descriptor, since the only thing that _should_ be calling write_to_descriptor is write_to_buffer (other than perhaps flushing a shutdown message before immediately exiting). The only reason for the write_to_buffer function is to create a io buffer to allow for fewer read/write calls (which take a lot of time). Lope's color code can't use write_to_descriptor or write_to_buffer, because it's intended to be totally configurable, and stock ROM has no concept of settings/configuration options outside of the character_data or pc_data structs(which aren't always accessable during a write_to_buffer or write_to_descriptor). If you don't want to configure your color codes, you can just perform the translation in write_to_descriptor before writing to the socket, and it'll work just fine. The other option would be to create the concept of a player account, and you can allow users to specify color options there. ~Kender ===== -----BEGIN GEEK CODE BLOCK----- Version 3.1 GCS/L/C/O d-(+) s++: a-- C+++$>++++ UBLS++++$ P+++(--)$ L+++>++++ E--- W+>++$ N !o K? w(--) !O M- !V PS+ PE(++) Y+ PGP->+ t+ 5 X+() R(+) tv+@ b++(+++) !DI+++ D G(-) e>+++$ h---() r+++ y+++ ------END GEEK CODE BLOCK------ __________________________________________________ Do you Yahoo!? Yahoo! Platinum - Watch CBS' NCAA March Madness, live on your desktop! http://platinum.yahoo.com

