mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-11-11 07:11:39 +00:00
Engine: don't extern 'clipmovetraceboxnum', add a new func. clipmovex() instead.
The 'x' is for "extended", since its last arg is a switch of whether to disable sliding. Use that from gameexec.c. git-svn-id: https://svn.eduke32.com/eduke32@3811 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
f051e1e229
commit
d0f538b283
3 changed files with 24 additions and 8 deletions
|
@ -1074,9 +1074,11 @@ static inline void rotatesprite_win(int32_t sx, int32_t sy, int32_t z, int16_t a
|
|||
void bfirst_search_init(int16_t *list, uint8_t *bitmap, int32_t *eltnumptr, int32_t maxnum, int16_t firstelt);
|
||||
void bfirst_search_try(int16_t *list, uint8_t *bitmap, int32_t *eltnumptr, int16_t elt);
|
||||
|
||||
extern int32_t clipmoveboxtracenum;
|
||||
int32_t clipmove(vec3_t *vect, int16_t *sectnum, int32_t xvect, int32_t yvect, int32_t walldist,
|
||||
int32_t ceildist, int32_t flordist, uint32_t cliptype) ATTRIBUTE((nonnull(1,2)));
|
||||
int32_t clipmovex(vec3_t *pos, int16_t *sectnum, int32_t xvect, int32_t yvect,
|
||||
int32_t walldist, int32_t ceildist, int32_t flordist, uint32_t cliptype,
|
||||
uint8_t noslidep) ATTRIBUTE((nonnull(1,2)));
|
||||
int32_t clipinsidebox(int32_t x, int32_t y, int16_t wallnum, int32_t walldist);
|
||||
int32_t clipinsideboxline(int32_t x, int32_t y, int32_t x1, int32_t y1,
|
||||
int32_t x2, int32_t y2, int32_t walldist);
|
||||
|
|
|
@ -12512,7 +12512,7 @@ int32_t lastwall(int16_t point)
|
|||
|
||||
////////// CLIPMOVE //////////
|
||||
|
||||
int32_t clipmoveboxtracenum = 3;
|
||||
static int32_t clipmoveboxtracenum = 3;
|
||||
|
||||
#ifdef HAVE_CLIPSHAPE_FEATURE
|
||||
static int32_t clipsprite_try(const spritetype *spr, int32_t xmin, int32_t ymin, int32_t xmax, int32_t ymax)
|
||||
|
@ -12660,6 +12660,23 @@ static void addclipline(int32_t dax1, int32_t day1, int32_t dax2, int32_t day2,
|
|||
}
|
||||
}
|
||||
|
||||
int32_t clipmovex(vec3_t *pos, int16_t *sectnum,
|
||||
int32_t xvect, int32_t yvect,
|
||||
int32_t walldist, int32_t ceildist, int32_t flordist, uint32_t cliptype,
|
||||
uint8_t noslidep)
|
||||
{
|
||||
int32_t ret;
|
||||
const int32_t oboxtracenum = clipmoveboxtracenum;
|
||||
|
||||
if (noslidep)
|
||||
clipmoveboxtracenum = 1;
|
||||
ret = clipmove(pos, sectnum, xvect, yvect,
|
||||
walldist, ceildist, flordist, cliptype);
|
||||
clipmoveboxtracenum = oboxtracenum;
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
//
|
||||
// clipmove
|
||||
//
|
||||
|
|
|
@ -2864,7 +2864,7 @@ nullquote:
|
|||
int32_t retvar=*insptr++, xvar=*insptr++, yvar=*insptr++, z=Gv_GetVarX(*insptr++), sectnumvar=*insptr++;
|
||||
int32_t xvect=Gv_GetVarX(*insptr++), yvect=Gv_GetVarX(*insptr++);
|
||||
int32_t walldist=Gv_GetVarX(*insptr++), floordist=Gv_GetVarX(*insptr++), ceildist=Gv_GetVarX(*insptr++);
|
||||
int32_t clipmask=Gv_GetVarX(*insptr++), oclipmoveboxtracenum=clipmoveboxtracenum;
|
||||
int32_t clipmask=Gv_GetVarX(*insptr++);
|
||||
int16_t sectnum;
|
||||
|
||||
vect.x = Gv_GetVarX(xvar);
|
||||
|
@ -2879,11 +2879,8 @@ nullquote:
|
|||
continue;
|
||||
}
|
||||
|
||||
if (tw==CON_CLIPMOVENOSLIDE)
|
||||
clipmoveboxtracenum = 1;
|
||||
Gv_SetVarX(retvar, clipmove(&vect, §num, xvect, yvect, walldist, floordist, ceildist, clipmask));
|
||||
if (tw==CON_CLIPMOVENOSLIDE)
|
||||
clipmoveboxtracenum = oclipmoveboxtracenum;
|
||||
Gv_SetVarX(retvar, clipmovex(&vect, §num, xvect, yvect, walldist, floordist, ceildist,
|
||||
clipmask, (tw==CON_CLIPMOVENOSLIDE)));
|
||||
Gv_SetVarX(sectnumvar, sectnum);
|
||||
Gv_SetVarX(xvar, vect.x);
|
||||
Gv_SetVarX(yvar, vect.y);
|
||||
|
|
Loading…
Reference in a new issue