mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-26 03:30:46 +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;
|
int32_t maxdist;
|
||||||
} clipinfo_t;
|
} clipinfo_t;
|
||||||
|
|
||||||
extern clipinfo_t clipinfo[CM_MAX];
|
|
||||||
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
int16_t numsectors, numwalls;
|
int16_t numsectors, numwalls;
|
||||||
|
@ -62,16 +60,9 @@ typedef struct
|
||||||
uwalltype *wall;
|
uwalltype *wall;
|
||||||
} mapinfo_t;
|
} mapinfo_t;
|
||||||
|
|
||||||
extern mapinfo_t origmapinfo, clipmapinfo;
|
|
||||||
|
|
||||||
extern void engineInitClipMaps();
|
|
||||||
extern int32_t quickloadboard;
|
extern int32_t quickloadboard;
|
||||||
extern int16_t *sectq;
|
extern void engineInitClipMaps();
|
||||||
extern int16_t pictoidx[MAXTILES]; // maps tile num to clipinfo[] index
|
|
||||||
extern int16_t clipspritelist[MAXCLIPNUM];
|
|
||||||
extern void engineSetClipMap(mapinfo_t *bak, mapinfo_t *newmap);
|
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
|
#endif // HAVE_CLIPSHAPE_FEATURE
|
||||||
typedef struct
|
typedef struct
|
||||||
|
@ -79,11 +70,7 @@ typedef struct
|
||||||
int32_t x1, y1, x2, y2;
|
int32_t x1, y1, x2, y2;
|
||||||
} linetype;
|
} linetype;
|
||||||
|
|
||||||
extern linetype clipit[MAXCLIPNUM];
|
extern int16_t clipsectorlist[MAXCLIPSECTORS];
|
||||||
|
|
||||||
extern int16_t clipnum;
|
|
||||||
extern int32_t clipsectnum, origclipsectnum, clipspritenum;
|
|
||||||
extern int16_t clipsectorlist[MAXCLIPSECTORS], origclipsectorlist[MAXCLIPSECTORS];
|
|
||||||
|
|
||||||
int clipinsidebox(vec2_t *vect, int wallnum, int walldist);
|
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);
|
int clipinsideboxline(int x, int y, int x1, int y1, int x2, int y2, int walldist);
|
||||||
|
@ -92,11 +79,11 @@ int sectoradjacent(int sect1, int sect2);
|
||||||
|
|
||||||
extern int32_t clipmoveboxtracenum;
|
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 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 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 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 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,
|
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)));
|
uint32_t const cliptype) ATTRIBUTE((nonnull(1, 2)));
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -9,14 +9,17 @@
|
||||||
#include "a.h"
|
#include "a.h"
|
||||||
#include "build.h"
|
#include "build.h"
|
||||||
#include "baselayer.h"
|
#include "baselayer.h"
|
||||||
|
#include "clip.h"
|
||||||
#include "engine_priv.h"
|
#include "engine_priv.h"
|
||||||
|
|
||||||
int16_t clipnum;
|
static int16_t clipnum;
|
||||||
linetype clipit[MAXCLIPNUM];
|
static linetype clipit[MAXCLIPNUM];
|
||||||
int32_t clipsectnum, origclipsectnum, clipspritenum;
|
static int32_t clipsectnum, origclipsectnum, clipspritenum;
|
||||||
int16_t clipsectorlist[MAXCLIPSECTORS], origclipsectorlist[MAXCLIPSECTORS];
|
int16_t clipsectorlist[MAXCLIPSECTORS];
|
||||||
|
static int16_t origclipsectorlist[MAXCLIPSECTORS];
|
||||||
|
static uint8_t clipsectormap[MAXCLIPSECTORS >> 3];
|
||||||
#ifdef HAVE_CLIPSHAPE_FEATURE
|
#ifdef HAVE_CLIPSHAPE_FEATURE
|
||||||
int16_t clipspritelist[MAXCLIPNUM]; // sector-like sprite clipping
|
static int16_t clipspritelist[MAXCLIPNUM]; // sector-like sprite clipping
|
||||||
#endif
|
#endif
|
||||||
static int16_t clipobjectval[MAXCLIPNUM];
|
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;
|
int32_t quickloadboard=0;
|
||||||
|
|
||||||
clipinfo_t clipinfo[CM_MAX];
|
static clipinfo_t clipinfo[CM_MAX];
|
||||||
static int32_t numclipmaps;
|
static int32_t numclipmaps;
|
||||||
|
|
||||||
static int32_t numclipsects; // number in sectq[]
|
static int32_t numclipsects; // number in sectq[]
|
||||||
static int16_t *sectoidx;
|
static int16_t *sectoidx;
|
||||||
int16_t *sectq; // [numsectors]
|
static int16_t *sectq; // [numsectors]
|
||||||
int16_t pictoidx[MAXTILES]; // maps tile num to clipinfo[] index
|
static int16_t pictoidx[MAXTILES]; // maps tile num to clipinfo[] index
|
||||||
static int16_t *tempictoidx;
|
static int16_t *tempictoidx;
|
||||||
|
|
||||||
static usectortype *loadsector;
|
static usectortype *loadsector;
|
||||||
|
|
Loading…
Reference in a new issue