… | |
… | |
82 | |
82 | |
83 | #define MAX_NAME 48 |
83 | #define MAX_NAME 48 |
84 | #define MAX_EXT_TITLE 98 |
84 | #define MAX_EXT_TITLE 98 |
85 | |
85 | |
86 | /* Fatal variables: */ |
86 | /* Fatal variables: */ |
|
|
87 | //TODO: remove all calls to fatal and replace them by cleanup |
87 | #define OUT_OF_MEMORY 0 |
88 | #define OUT_OF_MEMORY 0 |
88 | #define MAP_ERROR 1 |
89 | #define MAP_ERROR 1 |
89 | #define ARCHTABLE_TOO_SMALL 2 |
90 | #define ARCHTABLE_TOO_SMALL 2 // unused |
90 | #define TOO_MANY_ERRORS 3 |
91 | #define TOO_MANY_ERRORS 3 |
91 | |
92 | |
92 | /* TYPE DEFINES */ |
93 | /* TYPE DEFINES */ |
93 | |
94 | |
94 | /* Only add new values to this list if somewhere in the program code, |
95 | /* Only add new values to this list if somewhere in the program code, |
… | |
… | |
771 | #define BLANK_FACE_NAME "blank.x11" |
772 | #define BLANK_FACE_NAME "blank.x11" |
772 | #define EMPTY_FACE_NAME "empty.x11" |
773 | #define EMPTY_FACE_NAME "empty.x11" |
773 | #define DARK_FACE1_NAME "dark1.x11" |
774 | #define DARK_FACE1_NAME "dark1.x11" |
774 | #define DARK_FACE2_NAME "dark2.x11" |
775 | #define DARK_FACE2_NAME "dark2.x11" |
775 | #define DARK_FACE3_NAME "dark3.x11" |
776 | #define DARK_FACE3_NAME "dark3.x11" |
776 | #define SMOOTH_FACE_NAME "default_smoothed.111" |
|
|
777 | |
777 | |
778 | /* |
778 | /* |
779 | * Defines for the luck/random functions to make things more readable |
779 | * Defines for the luck/random functions to make things more readable |
780 | */ |
780 | */ |
781 | |
781 | |
… | |
… | |
921 | #define CAN_APPLY_UNAPPLY_CHOICE 0x40 |
921 | #define CAN_APPLY_UNAPPLY_CHOICE 0x40 |
922 | |
922 | |
923 | /* Cut off point of when an object is put on the active list or not */ |
923 | /* Cut off point of when an object is put on the active list or not */ |
924 | #define MIN_ACTIVE_SPEED 1e-5 |
924 | #define MIN_ACTIVE_SPEED 1e-5 |
925 | |
925 | |
926 | /* |
|
|
927 | * random() is much better than rand(). If you have random(), use it instead. |
|
|
928 | * You shouldn't need to change any of this |
|
|
929 | * |
|
|
930 | * 0.93.3: It looks like linux has random (previously, it was set below |
|
|
931 | * to use rand). Perhaps old version of linux lack rand? IF you run into |
|
|
932 | * problems, add || defined(__linux__) the #if immediately below. |
|
|
933 | * |
|
|
934 | * 0.94.2 - you probably shouldn't need to change any of the rand stuff |
|
|
935 | * here. |
|
|
936 | */ |
|
|
937 | |
|
|
938 | #define RANDOM() (rndm.next () & 0x7fffffffU) |
926 | #define RANDOM() (rndm.next () & 0xffffffU) |
939 | #define SRANDOM(xyz) //TODO, get rid of |
927 | #define SRANDOM(xyz) rndm.seed (xyz) //TODO, get rid of |
940 | |
928 | |
941 | /* Returns the weight of the given object. Note: it does not take the number of |
929 | /* Returns the weight of the given object. Note: it does not take the number of |
942 | * items (nrof) into account. |
930 | * items (nrof) into account. |
943 | */ |
931 | */ |
944 | #define WEIGHT(op) (op->nrof?op->weight:op->weight+op->carrying) |
932 | #define WEIGHT(op) (op->nrof?op->weight:op->weight+op->carrying) |