… | |
… | |
586 | * |
586 | * |
587 | */ |
587 | */ |
588 | #define OB_TYPE_MOVE_BLOCK(ob1, type) \ |
588 | #define OB_TYPE_MOVE_BLOCK(ob1, type) \ |
589 | ((type) && (ob1->move_type & type) == ob1->move_type) |
589 | ((type) && (ob1->move_type & type) == ob1->move_type) |
590 | |
590 | |
591 | #define SET_GENERATE_TYPE(xyz,va) (xyz)->stats.sp=(va) |
|
|
592 | #define GENERATE_TYPE(xyz) ((xyz)->stats.sp) |
|
|
593 | #define GENERATE_SPEED(xyz) ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */ |
591 | #define GENERATE_SPEED(xyz) ((xyz)->stats.maxsp) /* if(!RANDOM()%<speed>) */ |
594 | |
592 | |
595 | #define EXIT_PATH(xyz) (xyz)->slaying |
593 | #define EXIT_PATH(xyz) (xyz)->slaying |
596 | #define EXIT_LEVEL(xyz) (xyz)->stats.food |
594 | #define EXIT_LEVEL(xyz) (xyz)->stats.food |
597 | #define EXIT_X(xyz) (xyz)->stats.hp |
595 | #define EXIT_X(xyz) (xyz)->stats.hp |
… | |
… | |
759 | // also make sure that this is a float, not double, constant |
757 | // also make sure that this is a float, not double, constant |
760 | #define MIN_ACTIVE_SPEED (1.f / 65536.f) |
758 | #define MIN_ACTIVE_SPEED (1.f / 65536.f) |
761 | |
759 | |
762 | #define RANDOM() (rndm.next () & 0xffffffU) |
760 | #define RANDOM() (rndm.next () & 0xffffffU) |
763 | |
761 | |
764 | /* Returns the weight of the given object. Note: it does not take the number of |
|
|
765 | * items (nrof) into account. |
|
|
766 | * (this looks rather bogus, schmorp) |
|
|
767 | */ |
|
|
768 | #define WEIGHT(op) ((op)->nrof ? (op)->weight : (op)->weight + (op)->carrying) |
|
|
769 | |
|
|
770 | /* |
762 | /* |
771 | * Warning! |
763 | * Warning! |
772 | * If you add message types here, don't forget |
764 | * If you add message types here, don't forget |
773 | * to keep the client up to date too! |
765 | * to keep the client up to date too! |
774 | */ |
766 | */ |