Subversion Repositories eduke32

Rev

Rev 8792 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8792 Rev 8798
Line 386... Line 386...
386
int StdRandomRange(int range);
386
int StdRandomRange(int range);
387
#define STD_RANDOM_P2(pwr_of_2) (MOD_P2(rand(),(pwr_of_2)))
387
#define STD_RANDOM_P2(pwr_of_2) (MOD_P2(rand(),(pwr_of_2)))
388
#define STD_RANDOM_RANGE(range) (StdRandomRange(range))
388
#define STD_RANDOM_RANGE(range) (StdRandomRange(range))
389
#define STD_RANDOM() (rand())
389
#define STD_RANDOM() (rand())
390
390
-
 
391
#if 0
-
 
392
// TODO: PedanticMode
-
 
393
#define RANDOM_NEG(x,y) (PedanticMode \
-
 
394
                        ? ((RANDOM_P2(((x)<<(y))<<1) -  (x))<<(y)) \
-
 
395
                        :  (RANDOM_P2(((x)<<(y))<<1) - ((x) <<(y))))
-
 
396
#else
-
 
397
#define RANDOM_NEG(x,y) ((RANDOM_P2(((x)<<(y))<<1) - (x))<<(y))
-
 
398
#endif
-
 
399
391
#define MOVEx(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang) + 512)]) >> 14)
400
#define MOVEx(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang) + 512)]) >> 14)
392
#define MOVEy(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang))]) >> 14)
401
#define MOVEy(vel,ang) (((int)(vel) * (int)sintable[NORM_ANGLE((ang))]) >> 14)
393
402
394
#define DIST(x1, y1, x2, y2) ksqrt( SQ((x1) - (x2)) + SQ((y1) - (y2)) )
403
#define DIST(x1, y1, x2, y2) ksqrt( SQ((x1) - (x2)) + SQ((y1) - (y2)) )
395
404