ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/deliantra/server/include/define.h
(Generate patch)

Comparing deliantra/server/include/define.h (file contents):
Revision 1.27 by elmex, Wed Dec 20 14:38:50 2006 UTC vs.
Revision 1.34 by elmex, Sat Dec 30 21:07:46 2006 UTC

110 * flags 110 * flags
111 * Also, if you add new entries, try and fill up the holes in this list. 111 * Also, if you add new entries, try and fill up the holes in this list.
112 * Additionally, when you add a new entry, include it in the table in item.c 112 * Additionally, when you add a new entry, include it in the table in item.c
113 */ 113 */
114 114
115/* type 0 will be undefined and shows a non valid type information */
116
117/* USED TYPES: (for dead types please look at the bottom of the type 115/* USED TYPES: (for dead types please look at the bottom of the type
118 * definitions) 116 * definitions)
119 */ 117 */
118
119/* type 0 objects have the default behaviour */
120 120
121#define PLAYER 1 121#define PLAYER 1
122#define TRANSPORT 2 /* see pod/objects.pod */ 122#define TRANSPORT 2 /* see pod/objects.pod */
123#define ROD 3 123#define ROD 3
124#define TREASURE 4 124#define TREASURE 4
421 * If any FLAG's are added or changed, make sure the flag_names structure in 421 * If any FLAG's are added or changed, make sure the flag_names structure in
422 * common/loader.l is updated. 422 * common/loader.l is updated.
423 */ 423 */
424 424
425/* Basic routines to do above */ 425/* Basic routines to do above */
426#define SET_FLAG(obj, flag) (obj)->flags[flag] = 1 426#define SET_FLAG(obj, flg) (obj)->flag [flg] = 1
427#define CLEAR_FLAG(obj, flag) (obj)->flags[flag] = 0 427#define CLEAR_FLAG(obj, flg) (obj)->flag [flg] = 0
428#define QUERY_FLAG(obj, flag) (obj)->flags[flag] 428#define QUERY_FLAG(obj, flg) (obj)->flag [flg]
429 429
430/* the flags */ 430/* the flags */
431 431
432#define FLAG_ALIVE 0 /* Object can fight (or be fought) */ 432#define FLAG_ALIVE 0 /* Object can fight (or be fought) */
433#define FLAG_WIZ 1 /* Object has special privilegies */ 433#define FLAG_WIZ 1 /* Object has special privilegies */
579#define FLAG_BERSERK 99 /* monster will attack closest living 579#define FLAG_BERSERK 99 /* monster will attack closest living
580 object */ 580 object */
581#define FLAG_NEUTRAL 100 /* monster is from type neutral */ 581#define FLAG_NEUTRAL 100 /* monster is from type neutral */
582#define FLAG_NO_ATTACK 101 /* monster don't attack */ 582#define FLAG_NO_ATTACK 101 /* monster don't attack */
583#define FLAG_NO_DAMAGE 102 /* monster can't be damaged */ 583#define FLAG_NO_DAMAGE 102 /* monster can't be damaged */
584
585//TODO schmorp: removed in rewrite, not yet readded
584#define FLAG_OBJ_ORIGINAL 103 /* NEVER SET THIS. Item was loaded by 586#define FLAG_OBJ_ORIGINAL 103 /* NEVER SET THIS. Item was loaded by
585 * load_original_map() */ 587 * load_original_map() */
586#define FLAG_OBJ_SAVE_ON_OVL 104 /* this object should be saved on 588#define FLAG_OBJ_SAVE_ON_OVL 104 /* this object should be saved on
587 * the overlay, and is not subject to 589 * the overlay, and is not subject to
588 * decay. */ 590 * decay. */
590#define FLAG_ACTIVATE_ON_RELEASE 106 /* connected object is activated when 'released' */ 592#define FLAG_ACTIVATE_ON_RELEASE 106 /* connected object is activated when 'released' */
591#define FLAG_IS_WATER 107 593#define FLAG_IS_WATER 107
592#define FLAG_CONTENT_ON_GEN 108 594#define FLAG_CONTENT_ON_GEN 108
593#define FLAG_IS_A_TEMPLATE 109 /* Object has no ingame life until instanciated */ 595#define FLAG_IS_A_TEMPLATE 109 /* Object has no ingame life until instanciated */
594#define FLAG_IS_BUILDABLE 110 /* Can build on item */ 596#define FLAG_IS_BUILDABLE 110 /* Can build on item */
595#define FLAG_AFK 111 /* Player is AFK */ 597
596#define NUM_FLAGS 111 /* Should always be equal to the last 598#define NUM_FLAGS 111 /* Should always be equal to the last
597 * defined flag. If you change this, 599 * defined flag + 1. If you change this,
598 * make sure you update the flag_links 600 * make sure you update the flag_links
599 * in common/loader.l 601 * in common/loader.l
600 */ 602 */
601 603
602/* Values can go up to 127 before the size of the flags array in the 604/* Values can go up to 127 before the size of the flags array in the
809 /* changing directions */ 811 /* changing directions */
810 /* this is VERTICAL movement */ 812 /* this is VERTICAL movement */
811#define LO4 15 /* bitmasks for upper and lower 4 bits from 8 bit fields */ 813#define LO4 15 /* bitmasks for upper and lower 4 bits from 8 bit fields */
812#define HI4 240 814#define HI4 240
813 815
814/*
815 * Use of the state-variable in player objects:
816 */
817
818#define ST_PLAYING 0
819#define ST_PLAY_AGAIN 1
820#define ST_ROLL_STAT 2
821#define ST_CHANGE_CLASS 3
822#define ST_CONFIRM_QUIT 4
823#define ST_CONFIGURE 5
824#define ST_GET_NAME 6
825#define ST_GET_PASSWORD 7
826#define ST_CONFIRM_PASSWORD 8
827#define ST_GET_PARTY_PASSWORD 10
828
829#define BLANK_FACE_NAME "blank.111" 816#define BLANK_FACE_NAME "blank.111"
830#define EMPTY_FACE_NAME "empty.111" 817#define EMPTY_FACE_NAME "empty.111"
831#define DARK_FACE1_NAME "dark1.111" 818#define DARK_FACE1_NAME "dark1.111"
832#define DARK_FACE2_NAME "dark2.111" 819#define DARK_FACE2_NAME "dark2.111"
833#define DARK_FACE3_NAME "dark3.111" 820#define DARK_FACE3_NAME "dark3.111"
977#define CAN_APPLY_UNAPPLY 0x10 964#define CAN_APPLY_UNAPPLY 0x10
978#define CAN_APPLY_UNAPPLY_MULT 0x20 965#define CAN_APPLY_UNAPPLY_MULT 0x20
979#define CAN_APPLY_UNAPPLY_CHOICE 0x40 966#define CAN_APPLY_UNAPPLY_CHOICE 0x40
980 967
981/* Cut off point of when an object is put on the active list or not */ 968/* Cut off point of when an object is put on the active list or not */
982#define MIN_ACTIVE_SPEED 0.00001 969#define MIN_ACTIVE_SPEED 1e-5
983 970
984/* 971/*
985 * random() is much better than rand(). If you have random(), use it instead. 972 * random() is much better than rand(). If you have random(), use it instead.
986 * You shouldn't need to change any of this 973 * You shouldn't need to change any of this
987 * 974 *

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines