This mail does not mention the word 'flame' once.

From: Anthony Spataro (ads@netcom.com)
Date: 04/18/95


Most of the (very little) work I've been doing lately has involved 
cleaning up displays and making it easier to add color to the source.  
I've been using Circle 2.2 to avoid having to start over every time a new 
beta of 3 is released, but the coding is very straightforward.

I hate having to use %s and the CC_xxx macros to show things in color, so 
the first thing I did was create a function, enterm(), which replaces 
special color codes with ANSI escape sequences or nothing, depending on 
the player's color preferences, and add calls to enterm() in the proper 
places.  I went a little farther by defining different types of terminals 
and their associated escape sequences in the source, and letting players 
choose which terminal the enterm() function should use.

The other mod took me quite a while to figure out; I did quite a few 
stupid things and learned quite a bit about the source before I got it 
right.  What it does is combine objects of the same type when displaying 
lists of objects, i.e.

a smoking joint
a smoking joint      becomes        [3] a smoking joint
a smoking joint

The way it works is the obj_to_char, obj_to_room and obj_to_obj 
functions, instead of just inserting the new object at the head of the 
object list, check to see if there are any objects in the 
inventory/room/contents that have the same item_number, and if so, place 
the new object right before *that* object.  The net effect of this is 
that objects with the same vnum will get placed next to each other, 
instead of being scattered.  I rewrote part of list_obj_to_char to take 
advantage of this fact by counting how many of an object there are in a 
row and, if more than one, displaying [n] and then the object's name.

Like I said, all simple stuff, but good features to have.  If you want 
the source files, you're welcome to 'em, but don't expect diff to work 
too well since my editor reformats C code as it goes.
 _/\_
/ L  \
\_ C_/
  \/

"I'd love to go out with you, but I did my own thing and now I've got
to undo it."



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