mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Move insertsprite() and deletesprite() into engine.c instead of being inlined.
These operations aren't executed THAT often to warrant exposing four internal functions. Besides, I'll be hacking on them and need everything laid out cleanly. Should somebody complain, they can go change them to __fastcall or something. git-svn-id: https://svn.eduke32.com/eduke32@2465 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
a673b762d0
commit
846214a164
2 changed files with 27 additions and 32 deletions
|
@ -663,38 +663,14 @@ int32_t sectorofwall_noquick(int16_t theline);
|
|||
int32_t loopnumofsector(int16_t sectnum, int16_t wallnum);
|
||||
void setslope(int32_t sectnum, int32_t cf, int16_t slope);
|
||||
|
||||
// int32_t insertsprite(int16_t sectnum, int16_t statnum);
|
||||
// int32_t deletesprite(int16_t spritenum);
|
||||
|
||||
//
|
||||
// insertsprite
|
||||
//
|
||||
|
||||
int32_t insertspritesect(int16_t sectnum);
|
||||
int32_t insertspritestat(int16_t statnum);
|
||||
int32_t deletespritesect(int16_t deleteme);
|
||||
int32_t deletespritestat(int16_t deleteme);
|
||||
|
||||
int32_t lineintersect(int32_t x1, int32_t y1, int32_t z1, int32_t x2, int32_t y2, int32_t z2, int32_t x3,
|
||||
int32_t y3, int32_t x4, int32_t y4, int32_t *intx, int32_t *inty, int32_t *intz);
|
||||
|
||||
int32_t rayintersect(int32_t x1, int32_t y1, int32_t z1, int32_t vx, int32_t vy, int32_t vz, int32_t x3,
|
||||
int32_t y3, int32_t x4, int32_t y4, int32_t *intx, int32_t *inty, int32_t *intz);
|
||||
|
||||
static inline int32_t insertsprite(int16_t sectnum, int16_t statnum)
|
||||
{
|
||||
insertspritestat(statnum);
|
||||
return(insertspritesect(sectnum));
|
||||
}
|
||||
|
||||
//
|
||||
// deletesprite
|
||||
//
|
||||
static inline int32_t deletesprite(int16_t spritenum)
|
||||
{
|
||||
deletespritestat(spritenum);
|
||||
return(deletespritesect(spritenum));
|
||||
}
|
||||
int32_t insertsprite(int16_t sectnum, int16_t statnum);
|
||||
int32_t deletesprite(int16_t spritenum);
|
||||
|
||||
int32_t changespritesect(int16_t spritenum, int16_t newsectnum);
|
||||
int32_t changespritestat(int16_t spritenum, int16_t newstatnum);
|
||||
|
|
|
@ -7506,7 +7506,7 @@ int32_t getclosestcol(int32_t r, int32_t g, int32_t b)
|
|||
//
|
||||
// insertspritesect (internal)
|
||||
//
|
||||
int32_t insertspritesect(int16_t sectnum)
|
||||
static int32_t insertspritesect(int16_t sectnum)
|
||||
{
|
||||
int16_t blanktouse;
|
||||
|
||||
|
@ -7537,7 +7537,7 @@ int32_t insertspritesect(int16_t sectnum)
|
|||
//
|
||||
// insertspritestat (internal)
|
||||
//
|
||||
int32_t insertspritestat(int16_t statnum)
|
||||
static int32_t insertspritestat(int16_t statnum)
|
||||
{
|
||||
int16_t blanktouse; // a spritenum with no assigned statnum
|
||||
|
||||
|
@ -7568,7 +7568,7 @@ int32_t insertspritestat(int16_t statnum)
|
|||
//
|
||||
// deletespritesect (internal)
|
||||
//
|
||||
int32_t deletespritesect(int16_t deleteme)
|
||||
static int32_t deletespritesect(int16_t deleteme)
|
||||
{
|
||||
// only non-redundant from deletesprite():
|
||||
if (sprite[deleteme].sectnum == MAXSECTORS)
|
||||
|
@ -7595,7 +7595,7 @@ int32_t deletespritesect(int16_t deleteme)
|
|||
//
|
||||
// deletespritestat (internal)
|
||||
//
|
||||
int32_t deletespritestat(int16_t deleteme)
|
||||
static int32_t deletespritestat(int16_t deleteme)
|
||||
{
|
||||
// only non-redundant from deletesprite():
|
||||
if (sprite[deleteme].statnum == MAXSTATUS)
|
||||
|
@ -7619,10 +7619,29 @@ int32_t deletespritestat(int16_t deleteme)
|
|||
}
|
||||
|
||||
|
||||
//
|
||||
// insertsprite
|
||||
//
|
||||
int32_t insertsprite(int16_t sectnum, int16_t statnum)
|
||||
{
|
||||
insertspritestat(statnum);
|
||||
return(insertspritesect(sectnum));
|
||||
}
|
||||
|
||||
//
|
||||
// deletesprite
|
||||
//
|
||||
int32_t deletesprite(int16_t spritenum)
|
||||
{
|
||||
deletespritestat(spritenum);
|
||||
return(deletespritesect(spritenum));
|
||||
}
|
||||
|
||||
|
||||
//
|
||||
// lintersect (internal)
|
||||
//
|
||||
static inline int32_t lintersect(int32_t x1, int32_t y1, int32_t z1, int32_t x2, int32_t y2, int32_t z2, int32_t x3,
|
||||
static int32_t lintersect(int32_t x1, int32_t y1, int32_t z1, int32_t x2, int32_t y2, int32_t z2, int32_t x3,
|
||||
int32_t y3, int32_t x4, int32_t y4, int32_t *intx, int32_t *inty, int32_t *intz)
|
||||
{
|
||||
//p1 to p2 is a line segment
|
||||
|
@ -7661,7 +7680,7 @@ int32_t lineintersect(int32_t x1, int32_t y1, int32_t z1, int32_t x2, int32_t y2
|
|||
//
|
||||
// rintersect (internal)
|
||||
//
|
||||
static inline int32_t rintersect(int32_t x1, int32_t y1, int32_t z1, int32_t vx, int32_t vy, int32_t vz, int32_t x3,
|
||||
static int32_t rintersect(int32_t x1, int32_t y1, int32_t z1, int32_t vx, int32_t vy, int32_t vz, int32_t x3,
|
||||
int32_t y3, int32_t x4, int32_t y4, int32_t *intx, int32_t *inty, int32_t *intz)
|
||||
{
|
||||
//p1 towards p2 is a ray
|
||||
|
|
Loading…
Reference in a new issue