Re: [SNIPPET] [CODE] The Mapsnippet

From: George (greerga@circlemud.org)
Date: 12/13/98


On Sun, 13 Dec 1998, Fafhrd wrote:

>>I'd do these like this:
>>const char *sector_symbols[] = {
>>  "&Y#",
>>  "&W:",                  /* Or whatever color you want to use for each of
>>these */
>>  "&Y*",
>>...
>>  "&y.",
>>  "&G*"
>>};
>
>Bad move. If the symbols were ***, this method would send &G*&G*&G*, which
>is a bit more data than the player wants. Rather, make a check for the last
>color or symbol used, and see if the next one will be different. If so,
>terminate old color, send new. Otherwise, just send another symbol. ie,
>&G***&n&B~~~&n

Sensible color implementations remember the last color code themselves and
strip it.  So what he wants in the array works the best.

--
George Greer, greerga@circlemud.org | Genius may have its limitations, but
http://mouse.van.ml.org/   (mostly) | stupidity is not thus handicapped.
http://www.van.ml.org/CircleMUD/    |                  -- Elbert Hubbard


     +------------------------------------------------------------+
     | Ensure that you have read the CircleMUD Mailing List FAQ:  |
     |  http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html  |
     +------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 12/15/00 PST