- eliminated some leftover 16 bit values used for storing indices.

This commit is contained in:
Christoph Oelckers 2021-11-07 12:37:58 +01:00
parent 977d668bef
commit 0eba3335c6
6 changed files with 8 additions and 8 deletions

View file

@ -435,7 +435,7 @@ inline void updatesectorz(int32_t const x, int32_t const y, int32_t const z, int
*sectnum = snum;
}
void updatesectorneighbor(int32_t const x, int32_t const y, int16_t * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(3)));
void updatesectorneighbor(int32_t const x, int32_t const y, int * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(3)));
void updatesectorneighborz(int32_t const x, int32_t const y, int32_t const z, int16_t * const sectnum, int32_t initialMaxDistance = INITIALUPDATESECTORDIST, int32_t maxDistance = MAXUPDATESECTORDIST) ATTRIBUTE((nonnull(4)));
int findwallbetweensectors(int sect1, int sect2);

View file

@ -1358,7 +1358,7 @@ int findwallbetweensectors(int sect1, int sect2)
//
void updatesector(int32_t const x, int32_t const y, int * const sectnum)
{
int16_t sect = *sectnum;
int sect = *sectnum;
updatesectorneighbor(x, y, &sect, INITIALUPDATESECTORDIST, MAXUPDATESECTORDIST);
if (sect != -1)
SET_AND_RETURN(*sectnum, sect);

View file

@ -1117,8 +1117,8 @@ static void movetripbomb(DDukeActor *actor)
s->z -= (3 << 8);
// Laser fix from EDuke32.
int16_t const oldSectNum = s->sectnum;
int16_t curSectNum = s->sectnum;
int const oldSectNum = s->sectnum;
int curSectNum = s->sectnum;
updatesectorneighbor(s->x, s->y, &curSectNum, 1024, 2048);
changeactorsect(actor, curSectNum);

View file

@ -187,7 +187,7 @@ inline int clipmove_ex(int* x, int* y, int* z, int* sect, int xv, int yv, int wa
return result.setFromEngine(res);
}
inline void getzrange_ex(int x, int y, int z, int16_t sectnum, int32_t* ceilz, Collision& ceilhit, int32_t* florz, Collision& florhit, int32_t walldist, uint32_t cliptype)
inline void getzrange_ex(int x, int y, int z, int sectnum, int32_t* ceilz, Collision& ceilhit, int32_t* florz, Collision& florhit, int32_t walldist, uint32_t cliptype)
{
int ch, fh;
getzrange(x, y, z, sectnum, ceilz, &ch, florz, &fh, walldist, cliptype);
@ -195,7 +195,7 @@ inline void getzrange_ex(int x, int y, int z, int16_t sectnum, int32_t* ceilz, C
florhit.setFromEngine(fh);
}
inline int hitscan(int x, int y, int z, int16_t sectnum, int32_t vx, int32_t vy, int32_t vz,
inline int hitscan(int x, int y, int z, int sectnum, int32_t vx, int32_t vy, int32_t vz,
int* hitsect, int* hitwall, DDukeActor** hitspr, int* hitx, int* hity, int* hitz, uint32_t cliptype)
{
short hitsprt, hitsct, hitwal;

View file

@ -105,7 +105,7 @@ int animatetarget[MAXANIMATES];
int animategoal[MAXANIMATES];
int animatevel[MAXANIMATES];
int numclouds; // cloudy skies
int16_t clouds[256];
int clouds[256];
float cloudx;
float cloudy;
int cloudclock;

View file

@ -90,7 +90,7 @@ extern int8_t animatetype[MAXANIMATES];
extern int animategoal[MAXANIMATES];
extern int animatevel[MAXANIMATES];
extern int16_t clouds[256];
extern int clouds[256];
extern float cloudx;
extern float cloudy;
extern int cloudclock;