… | |
… | |
945 | * |
945 | * |
946 | * 0.94.2 - you probably shouldn't need to change any of the rand stuff |
946 | * 0.94.2 - you probably shouldn't need to change any of the rand stuff |
947 | * here. |
947 | * here. |
948 | */ |
948 | */ |
949 | |
949 | |
950 | #define RANDOM() random() |
950 | #define RANDOM() (rndm.next () & 0x7fffffffU) |
951 | #define SRANDOM(xyz) srandom(xyz) |
951 | #define SRANDOM(xyz) //TODO, get rid of |
952 | |
952 | |
953 | /* Returns the weight of the given object. Note: it does not take the number of |
953 | /* Returns the weight of the given object. Note: it does not take the number of |
954 | * items (nrof) into account. |
954 | * items (nrof) into account. |
955 | */ |
955 | */ |
956 | #define WEIGHT(op) (op->nrof?op->weight:op->weight+op->carrying) |
956 | #define WEIGHT(op) (op->nrof?op->weight:op->weight+op->carrying) |