… | |
… | |
914 | #define CAN_APPLY_NOT_MASK 0xf |
914 | #define CAN_APPLY_NOT_MASK 0xf |
915 | #define CAN_APPLY_UNAPPLY 0x10 |
915 | #define CAN_APPLY_UNAPPLY 0x10 |
916 | #define CAN_APPLY_UNAPPLY_MULT 0x20 |
916 | #define CAN_APPLY_UNAPPLY_MULT 0x20 |
917 | #define CAN_APPLY_UNAPPLY_CHOICE 0x40 |
917 | #define CAN_APPLY_UNAPPLY_CHOICE 0x40 |
918 | |
918 | |
919 | /* Cut off point of when an object is put on the active list or not */ |
919 | // Cut off point of when an object is put on the active list or not |
|
|
920 | // we use 2**-n because that can be represented exactly |
|
|
921 | // also make sure that this is a float, not double, constant |
920 | #define MIN_ACTIVE_SPEED 1e-5 |
922 | #define MIN_ACTIVE_SPEED (1.f / 65536.f) |
921 | |
923 | |
922 | #define RANDOM() (rndm.next () & 0xffffffU) |
924 | #define RANDOM() (rndm.next () & 0xffffffU) |
923 | #define SRANDOM(xyz) rndm.seed (xyz) //TODO, get rid of |
925 | #define SRANDOM(xyz) rndm.seed (xyz) //TODO, get rid of |
924 | |
926 | |
925 | /* Returns the weight of the given object. Note: it does not take the number of |
927 | /* Returns the weight of the given object. Note: it does not take the number of |