mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
Clean up clip.h and declare a bunch of stuff in clip.cpp static
git-svn-id: https://svn.eduke32.com/eduke32@7571 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
7d0faa5752
commit
8a68bffdb0
2 changed files with 20 additions and 30 deletions
|
@ -53,8 +53,6 @@ typedef struct
|
|||
int32_t maxdist;
|
||||
} clipinfo_t;
|
||||
|
||||
extern clipinfo_t clipinfo[CM_MAX];
|
||||
|
||||
typedef struct
|
||||
{
|
||||
int16_t numsectors, numwalls;
|
||||
|
@ -62,16 +60,9 @@ typedef struct
|
|||
uwalltype *wall;
|
||||
} mapinfo_t;
|
||||
|
||||
extern mapinfo_t origmapinfo, clipmapinfo;
|
||||
|
||||
extern void engineInitClipMaps();
|
||||
extern int32_t quickloadboard;
|
||||
extern int16_t *sectq;
|
||||
extern int16_t pictoidx[MAXTILES]; // maps tile num to clipinfo[] index
|
||||
extern int16_t clipspritelist[MAXCLIPNUM];
|
||||
extern void engineInitClipMaps();
|
||||
extern void engineSetClipMap(mapinfo_t *bak, mapinfo_t *newmap);
|
||||
extern int32_t clipsprite_try(uspritetype const * spr, int32_t xmin, int32_t ymin, int32_t xmax, int32_t ymax);
|
||||
extern int32_t clipsprite_initindex(int32_t curidx, uspritetype const * curspr, int32_t *clipsectcnt, const vec3_t *vect);
|
||||
|
||||
#endif // HAVE_CLIPSHAPE_FEATURE
|
||||
typedef struct
|
||||
|
@ -79,11 +70,7 @@ typedef struct
|
|||
int32_t x1, y1, x2, y2;
|
||||
} linetype;
|
||||
|
||||
extern linetype clipit[MAXCLIPNUM];
|
||||
|
||||
extern int16_t clipnum;
|
||||
extern int32_t clipsectnum, origclipsectnum, clipspritenum;
|
||||
extern int16_t clipsectorlist[MAXCLIPSECTORS], origclipsectorlist[MAXCLIPSECTORS];
|
||||
extern int16_t clipsectorlist[MAXCLIPSECTORS];
|
||||
|
||||
int clipinsidebox(vec2_t *vect, int wallnum, int walldist);
|
||||
int clipinsideboxline(int x, int y, int x1, int y1, int x2, int y2, int walldist);
|
||||
|
@ -92,12 +79,12 @@ int sectoradjacent(int sect1, int sect2);
|
|||
|
||||
extern int32_t clipmoveboxtracenum;
|
||||
|
||||
int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int32_t yvect, int32_t const walldist, int32_t const ceildist,
|
||||
int32_t const flordist, uint32_t const cliptype) ATTRIBUTE((nonnull(1, 2)));
|
||||
int32_t clipmovex(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int32_t yvect, int32_t const walldist, int32_t const ceildist,
|
||||
int32_t const flordist, uint32_t const cliptype, uint8_t const noslidep) ATTRIBUTE((nonnull(1, 2)));
|
||||
int32_t pushmove(vec3_t * const vect, int16_t * const sectnum, int32_t const walldist, int32_t const ceildist, int32_t const flordist,
|
||||
uint32_t const cliptype) ATTRIBUTE((nonnull(1, 2)));
|
||||
int32_t clipmove(vec3_t *const pos, int16_t *const sectnum, int32_t xvect, int32_t yvect, int32_t const walldist, int32_t const ceildist,
|
||||
int32_t const flordist, uint32_t const cliptype) ATTRIBUTE((nonnull(1, 2)));
|
||||
int32_t clipmovex(vec3_t *const pos, int16_t *const sectnum, int32_t xvect, int32_t yvect, int32_t const walldist, int32_t const ceildist,
|
||||
int32_t const flordist, uint32_t const cliptype, uint8_t const noslidep) ATTRIBUTE((nonnull(1, 2)));
|
||||
int32_t pushmove(vec3_t *const vect, int16_t *const sectnum, int32_t const walldist, int32_t const ceildist, int32_t const flordist,
|
||||
uint32_t const cliptype) ATTRIBUTE((nonnull(1, 2)));
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
|
@ -9,14 +9,17 @@
|
|||
#include "a.h"
|
||||
#include "build.h"
|
||||
#include "baselayer.h"
|
||||
#include "clip.h"
|
||||
#include "engine_priv.h"
|
||||
|
||||
int16_t clipnum;
|
||||
linetype clipit[MAXCLIPNUM];
|
||||
int32_t clipsectnum, origclipsectnum, clipspritenum;
|
||||
int16_t clipsectorlist[MAXCLIPSECTORS], origclipsectorlist[MAXCLIPSECTORS];
|
||||
static int16_t clipnum;
|
||||
static linetype clipit[MAXCLIPNUM];
|
||||
static int32_t clipsectnum, origclipsectnum, clipspritenum;
|
||||
int16_t clipsectorlist[MAXCLIPSECTORS];
|
||||
static int16_t origclipsectorlist[MAXCLIPSECTORS];
|
||||
static uint8_t clipsectormap[MAXCLIPSECTORS >> 3];
|
||||
#ifdef HAVE_CLIPSHAPE_FEATURE
|
||||
int16_t clipspritelist[MAXCLIPNUM]; // sector-like sprite clipping
|
||||
static int16_t clipspritelist[MAXCLIPNUM]; // sector-like sprite clipping
|
||||
#endif
|
||||
static int16_t clipobjectval[MAXCLIPNUM];
|
||||
|
||||
|
@ -41,16 +44,16 @@ void engineSetClipMap(mapinfo_t *bak, mapinfo_t *newmap)
|
|||
}
|
||||
}
|
||||
|
||||
mapinfo_t origmapinfo, clipmapinfo;
|
||||
static mapinfo_t origmapinfo, clipmapinfo;
|
||||
int32_t quickloadboard=0;
|
||||
|
||||
clipinfo_t clipinfo[CM_MAX];
|
||||
static clipinfo_t clipinfo[CM_MAX];
|
||||
static int32_t numclipmaps;
|
||||
|
||||
static int32_t numclipsects; // number in sectq[]
|
||||
static int16_t *sectoidx;
|
||||
int16_t *sectq; // [numsectors]
|
||||
int16_t pictoidx[MAXTILES]; // maps tile num to clipinfo[] index
|
||||
static int16_t *sectq; // [numsectors]
|
||||
static int16_t pictoidx[MAXTILES]; // maps tile num to clipinfo[] index
|
||||
static int16_t *tempictoidx;
|
||||
|
||||
static usectortype *loadsector;
|
||||
|
|
Loading…
Reference in a new issue