mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Move #define PI from to build.h, add bound-checking assertion in dosetaspect().
git-svn-id: https://svn.eduke32.com/eduke32@2987 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
52bb35361b
commit
5bca5f59ad
3 changed files with 3 additions and 1 deletions
|
@ -16,6 +16,8 @@
|
|||
extern "C" {
|
||||
#endif
|
||||
|
||||
#define PI 3.14159265358979323
|
||||
|
||||
#define MAXSECTORSV8 4096
|
||||
#define MAXWALLSV8 16384
|
||||
#define MAXSPRITESV8 16384
|
||||
|
|
|
@ -13,7 +13,6 @@ extern int32_t lastcullcheck;
|
|||
extern char cullmodel[MAXSPRITES];
|
||||
extern int32_t cullcheckcnt;
|
||||
|
||||
#define PI 3.14159265358979323
|
||||
extern char TEXCACHEFILE[BMAX_PATH];
|
||||
|
||||
typedef struct { char r, g, b, a; } coltype;
|
||||
|
|
|
@ -7470,6 +7470,7 @@ static void dosetaspect(void)
|
|||
for (i=0; i<xdimen; i++)
|
||||
{
|
||||
j = (x&65535); k = (x>>16); x += xinc;
|
||||
Bassert(k >= 0 && k < (int32_t)(sizeof(radarang)/sizeof(radarang[0]))-1);
|
||||
if (j != 0) j = mulscale16(radarang[k+1]-radarang[k], j);
|
||||
radarang2[i] = (int16_t)((radarang[k]+j)>>6);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue