On Wed, 25 Feb 1998, David Wiklund wrote:
>But I have encountered a prob when I set the stats over 127 it turns into
>a "-"... ex. if I set it to 128 it is -128 but if I set it to like 160 I
>get about -126 or somethin'?!?!
Using basic C knowledge you could deduce that the variable is a 'signed
char' (which CircleMUD sometimes calls a byte).
You'll also note that all variables that are used throughout the code are
in header files.
So:
egrep -n "(char [a-z]|byte)" *.h
('char [a-z]' is to avoid char *)
db.h:112: * 'E': Obj to char equip *
handler.h:13:void affect_modify(struct char_data *ch, byte loc, sbyte mod, long bitv, bool add);
interpreter.h:26:char lower( char c );
interpreter.h:46: byte minimum_position;
mail.h:25:/* Maximum size of mail in bytes (arbitrary) */
spells.h:169: byte min_position; /* Position for caster */
spells.h:176: byte violent;
spells.h:189: bit 7 : If fighting, and no argument, select tar_char as self
spells.h:190: bit 8 : If fighting, and no argument, select tar_char as victim (fighting)
structs.h:74:/* char and mob-related defines *****************************************/
structs.h:460:typedef signed char sbyte;
structs.h:461:typedef unsigned char ubyte;
structs.h:467:typedef char byte;
structs.h:493: byte type_flag; /* Type of item */
----
structs.h:506: byte location; /* Which ability to change (APPLY_XXX) */
structs.h:507: sbyte modifier; /* How much it changes by */
----
structs.h:596: byte light; /* Number of lightsources in room */
structs.h:641: byte sex; /* PC / NPC's sex */
structs.h:642: byte class; /* PC / NPC's class */
And there you go, 'sbyte modifier.'
--
George Greer - Me@Null.net | Genius may have its limitations, but stupidity
http://www.van.ml.org/~greerga | is not thus handicapped. -- Elbert Hubbard
+------------------------------------------------------------+
| Ensure that you have read the CircleMUD Mailing List FAQ: |
| http://democracy.queensu.ca/~fletcher/Circle/list-faq.html |
+------------------------------------------------------------+
This archive was generated by hypermail 2b30 : 12/15/00 PST