mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 17:01:28 +00:00
- some cleanup of build.h
This commit is contained in:
parent
be3292d29b
commit
0a0a995cbd
6 changed files with 43 additions and 78 deletions
|
@ -401,9 +401,7 @@ void DrawMirrors(int x, int y, int z, fixed_t a, fixed_t horiz, int smooth, int
|
||||||
gPlayer[viewPlayer].pSprite->cstat |= 514;
|
gPlayer[viewPlayer].pSprite->cstat |= 514;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
yax_preparedrawrooms();
|
|
||||||
renderDrawRoomsQ16(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, a, horiz, nSector|MAXSECTORS);
|
renderDrawRoomsQ16(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, a, horiz, nSector|MAXSECTORS);
|
||||||
yax_drawrooms(viewProcessSprites, nSector, 0, smooth);
|
|
||||||
viewProcessSprites(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, FixedToInt(a), smooth);
|
viewProcessSprites(x+mirror[i].at8, y+mirror[i].atc, z+mirror[i].at10, FixedToInt(a), smooth);
|
||||||
short cstat = sector[nSector].ceilingstat;
|
short cstat = sector[nSector].ceilingstat;
|
||||||
sector[nSector].ceilingstat |= 1;
|
sector[nSector].ceilingstat |= 1;
|
||||||
|
|
|
@ -19,10 +19,6 @@ static_assert('\xff' == 255, "Char must be unsigned!");
|
||||||
# error C++11 or greater is required.
|
# error C++11 or greater is required.
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined _MSC_VER && _MSC_VER < 1800
|
|
||||||
# error Visual Studio 2013 is the minimum supported version.
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "compat.h"
|
#include "compat.h"
|
||||||
#include "palette.h"
|
#include "palette.h"
|
||||||
#include "pragmas.h"
|
#include "pragmas.h"
|
||||||
|
@ -47,51 +43,38 @@ enum rendmode_t {
|
||||||
|
|
||||||
#define BANG2RAD (PI * (1./1024.))
|
#define BANG2RAD (PI * (1./1024.))
|
||||||
|
|
||||||
#define MAXSECTORSV8 4096
|
enum
|
||||||
#define MAXWALLSV8 16384
|
{
|
||||||
#define MAXSPRITESV8 16384
|
MAXSECTORS = 4096,
|
||||||
|
MAXWALLS = 16384,
|
||||||
|
MAXSPRITES = 16384,
|
||||||
|
|
||||||
#define MAXVOXMIPS 5
|
MAXVOXMIPS = 5,
|
||||||
|
|
||||||
|
MAXXDIM = 7680,
|
||||||
|
MAXYDIM = 3200,
|
||||||
|
MINXDIM = 640,
|
||||||
|
MINYDIM = 480,
|
||||||
|
|
||||||
|
MAXWALLSB = ((MAXWALLS >> 2) + (MAXWALLS >> 3)),
|
||||||
|
|
||||||
|
MAXVOXELS = 1024,
|
||||||
|
MAXSTATUS = 1024,
|
||||||
|
// Maximum number of component tiles in a multi-psky:
|
||||||
|
MAXPSKYTILES = 16,
|
||||||
|
MAXSPRITESONSCREEN = 2560,
|
||||||
|
MAXUNIQHUDID = 256, //Extra slots so HUD models can store animation state without messing game sprites
|
||||||
|
|
||||||
|
TSPR_TEMP = 99,
|
||||||
|
|
||||||
|
CLIPMASK0 = (IntToFixed(1)+1),
|
||||||
|
CLIPMASK1 = (IntToFixed(256)+64),
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
# define MAXSECTORS MAXSECTORSV8
|
|
||||||
# define MAXWALLS MAXWALLSV8
|
|
||||||
# define MAXSPRITES MAXSPRITESV8
|
|
||||||
|
|
||||||
# define MAXXDIM 7680
|
|
||||||
# define MAXYDIM 3200
|
|
||||||
# define MINXDIM 640
|
|
||||||
# define MINYDIM 480
|
|
||||||
|
|
||||||
#define MAXWALLSB ((MAXWALLS>>2)+(MAXWALLS>>3))
|
|
||||||
|
|
||||||
#define MAXVOXELS 1024
|
|
||||||
#define MAXSTATUS 1024
|
|
||||||
// Maximum number of component tiles in a multi-psky:
|
|
||||||
#define MAXPSKYTILES 16
|
|
||||||
#define MAXSPRITESONSCREEN 2560
|
|
||||||
#define MAXUNIQHUDID 256 //Extra slots so HUD models can store animation state without messing game sprites
|
|
||||||
|
|
||||||
#define TSPR_TEMP 99
|
|
||||||
|
|
||||||
#define PR_LIGHT_PRIO_MAX 0
|
|
||||||
#define PR_LIGHT_PRIO_MAX_GAME 1
|
|
||||||
#define PR_LIGHT_PRIO_HIGH 2
|
|
||||||
#define PR_LIGHT_PRIO_HIGH_GAME 3
|
|
||||||
#define PR_LIGHT_PRIO_LOW 4
|
|
||||||
#define PR_LIGHT_PRIO_LOW_GAME 5
|
|
||||||
|
|
||||||
#define SPRITES_OF_SECT(Sectnum, Iter) Iter=headspritesect[Sectnum]; Iter>=0; Iter=nextspritesect[Iter]
|
|
||||||
|
|
||||||
|
|
||||||
#define CLIPMASK0 (IntToFixed(1)+1)
|
|
||||||
#define CLIPMASK1 (IntToFixed(256)+64)
|
|
||||||
|
|
||||||
#define NEXTWALL(i) (wall[wall[i].nextwall])
|
|
||||||
#define POINT2(i) (wall[wall[i].point2])
|
#define POINT2(i) (wall[wall[i].point2])
|
||||||
|
|
||||||
// max x/y val (= max editorgridextent in Mapster32)
|
|
||||||
#define BXY_MAX 524288
|
|
||||||
|
|
||||||
// rotatesprite 'orientation' (actually much more) bits
|
// rotatesprite 'orientation' (actually much more) bits
|
||||||
enum {
|
enum {
|
||||||
|
@ -127,22 +110,6 @@ enum {
|
||||||
# define EXTERN extern
|
# define EXTERN extern
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define TrackerCast(x) x
|
|
||||||
|
|
||||||
|
|
||||||
// Links to various ABIs specifying (or documenting non-normatively) the
|
|
||||||
// alignment requirements of aggregates:
|
|
||||||
//
|
|
||||||
// System V AMD64: http://www.x86-64.org/documentation/abi-0.99.pdf
|
|
||||||
// (x86-64.org down as of 2013-02-02?)
|
|
||||||
// "An array uses the same alignment as its elements, except that a local or global
|
|
||||||
// array variable of length at least 16 bytes or a C99 variable-length array variable
|
|
||||||
// always has alignment of at least 16 bytes."
|
|
||||||
// (Not reproducible with GCC or LuaJIT on Ubuntu)
|
|
||||||
//
|
|
||||||
// Win64: http://msdn.microsoft.com/en-us/library/9dbwhz68.aspx
|
|
||||||
//
|
|
||||||
// x86: http://en.wikipedia.org/wiki/Data_structure_alignment#Typical_alignment_of_C_structs_on_x86
|
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
SPR_XFLIP = 4,
|
SPR_XFLIP = 4,
|
||||||
|
@ -352,7 +319,7 @@ typedef struct {
|
||||||
// New multi-psky
|
// New multi-psky
|
||||||
EXTERN TArray<psky_t> multipskies;
|
EXTERN TArray<psky_t> multipskies;
|
||||||
|
|
||||||
static FORCE_INLINE psky_t *getpskyidx(int32_t picnum)
|
static inline psky_t *getpskyidx(int32_t picnum)
|
||||||
{
|
{
|
||||||
for (auto& sky : multipskies)
|
for (auto& sky : multipskies)
|
||||||
if (picnum == sky.tilenum) return &sky;
|
if (picnum == sky.tilenum) return &sky;
|
||||||
|
|
|
@ -1212,10 +1212,10 @@ void PrintSpriteInfo(PLAYERp pp)
|
||||||
}
|
}
|
||||||
if (sp)
|
if (sp)
|
||||||
{
|
{
|
||||||
Printf("POSX:%d, ", TrackerCast(sp->x));
|
Printf("POSX:%d, ", sp->x);
|
||||||
Printf("POSY:%d, ", TrackerCast(sp->y));
|
Printf("POSY:%d, ", sp->y);
|
||||||
Printf("POSZ:%d,", TrackerCast(sp->z));
|
Printf("POSZ:%d,", sp->z);
|
||||||
Printf("ANG:%d\n", TrackerCast(sp->ang));
|
Printf("ANG:%d\n", sp->ang);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -374,8 +374,8 @@ void JS_InitMirrors(void)
|
||||||
|
|
||||||
if (!Found_Cam)
|
if (!Found_Cam)
|
||||||
{
|
{
|
||||||
Printf("Cound not find the camera view sprite for match %d\n",TrackerCast(wall[i].hitag));
|
Printf("Cound not find the camera view sprite for match %d\n", wall[i].hitag);
|
||||||
Printf("Map Coordinates: x = %d, y = %d\n",TrackerCast(wall[i].x),TrackerCast(wall[i].y));
|
Printf("Map Coordinates: x = %d, y = %d\n", wall[i].x, wall[i].y);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -402,9 +402,9 @@ void JS_InitMirrors(void)
|
||||||
|
|
||||||
if (!Found_Cam)
|
if (!Found_Cam)
|
||||||
{
|
{
|
||||||
Printf("Did not find drawtotile for camera number %d\n",mirrorcnt);
|
Printf("Did not find drawtotile for camera number %d\n", mirrorcnt);
|
||||||
Printf("wall[%d].hitag == %d\n",i,TrackerCast(wall[i].hitag));
|
Printf("wall[%d].hitag == %d\n", i, wall[i].hitag);
|
||||||
Printf("Map Coordinates: x = %d, y = %d\n", TrackerCast(wall[i].x), TrackerCast(wall[i].y));
|
Printf("Map Coordinates: x = %d, y = %d\n", wall[i].x, wall[i].y);
|
||||||
RESET_BOOL1(&sprite[mirror[mirrorcnt].camera]);
|
RESET_BOOL1(&sprite[mirror[mirrorcnt].camera]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1205,16 +1205,16 @@ JS_PlockError(short wall_num, short t)
|
||||||
switch (t)
|
switch (t)
|
||||||
{
|
{
|
||||||
case 1:
|
case 1:
|
||||||
Printf("wall %d, x %d, y %d, pic %d\n", wall_num, TrackerCast(wall[wall_num].x), TrackerCast(wall[wall_num].y), TrackerCast(wall[wall_num].picnum));
|
Printf("wall %d, x %d, y %d, pic %d\n", wall_num, wall[wall_num].x, wall[wall_num].y, wall[wall_num].picnum);
|
||||||
break;
|
break;
|
||||||
case 2:
|
case 2:
|
||||||
Printf("wall %d, x %d, y %d, OVERpic %d\n", wall_num, TrackerCast(wall[wall_num].x), TrackerCast(wall[wall_num].y), TrackerCast(wall[wall_num].overpicnum));
|
Printf("wall %d, x %d, y %d, OVERpic %d\n", wall_num, wall[wall_num].x, wall[wall_num].y, wall[wall_num].overpicnum);
|
||||||
break;
|
break;
|
||||||
case 3:
|
case 3:
|
||||||
Printf("sector %d, ceiling %d\n", wall_num, TrackerCast(sector[wall_num].ceilingpicnum));
|
Printf("sector %d, ceiling %d\n", wall_num, sector[wall_num].ceilingpicnum);
|
||||||
break;
|
break;
|
||||||
case 4:
|
case 4:
|
||||||
Printf("sector %d, floor %d\n", wall_num, TrackerCast(sector[wall_num].floorpicnum));
|
Printf("sector %d, floor %d\n", wall_num, sector[wall_num].floorpicnum);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -1082,7 +1082,7 @@ ActorTestSpawn(SPRITEp sp)
|
||||||
default: c = "?"; break;
|
default: c = "?"; break;
|
||||||
}
|
}
|
||||||
Printf("WARNING: skill-masked %s at %d,%d,%d not being killed because it "
|
Printf("WARNING: skill-masked %s at %d,%d,%d not being killed because it "
|
||||||
"activates something\n", c, TrackerCast(sp->x), TrackerCast(sp->y), TrackerCast(sp->z));
|
"activates something\n", c, sp->x, sp->y, sp->z);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
//always spawn girls in addons
|
//always spawn girls in addons
|
||||||
|
@ -2882,7 +2882,7 @@ SpriteSetup(void)
|
||||||
{
|
{
|
||||||
if (sprite[i].hitag == sp->hitag && sprite[i].lotag == sp->lotag)
|
if (sprite[i].hitag == sp->hitag && sprite[i].lotag == sp->lotag)
|
||||||
{
|
{
|
||||||
I_Error("Two VIEW_THRU_ tags with same match found on level\n1: x %d, y %d \n2: x %d, y %d", TrackerCast(sp->x), TrackerCast(sp->y), TrackerCast(sprite[i].x), TrackerCast(sprite[i].y));
|
I_Error("Two VIEW_THRU_ tags with same match found on level\n1: x %d, y %d \n2: x %d, y %d", sp->x, sp->y, sprite[i].x, sprite[i].y);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
change_sprite_stat(SpriteNum, STAT_FAF);
|
change_sprite_stat(SpriteNum, STAT_FAF);
|
||||||
|
|
|
@ -1597,7 +1597,7 @@ PlaceActorsOnTracks(void)
|
||||||
|
|
||||||
if (Track[u->track].NumPoints == 0)
|
if (Track[u->track].NumPoints == 0)
|
||||||
{
|
{
|
||||||
Printf("WARNING: Sprite %d (%d, %d) placed on track %d with no points!\n", i, TrackerCast(sp->x), TrackerCast(sp->y), u->track);
|
Printf("WARNING: Sprite %d (%d, %d) placed on track %d with no points!\n", i, sp->x, sp->y, u->track);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue