Skip to content

Commit

Permalink
- Repair some potential issues from 1354d52 that might be causing iss…
Browse files Browse the repository at this point in the history
…ues with #455.
  • Loading branch information
mjr4077au committed Jul 17, 2021
1 parent 08a1078 commit c58992a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions source/build/include/build.h
Expand Up @@ -56,8 +56,8 @@ enum

TSPR_TEMP = 99,

CLIPMASK0 = (IntToFixed(1)+1),
CLIPMASK1 = (IntToFixed(256)+64),
CLIPMASK0 = (1 << 16) + 1,
CLIPMASK1 = (256 << 16) + 64
};


Expand Down
8 changes: 4 additions & 4 deletions source/build/src/clip.cpp
Expand Up @@ -480,7 +480,7 @@ int32_t clipmove(vec3_t * const pos, int16_t * const sectnum, int32_t xvect, int
int const initialsectnum = *sectnum;

int32_t const dawalclipmask = (cliptype & 65535); // CLIPMASK0 = 0x00010001
int32_t const dasprclipmask = FixedToInt(cliptype); // CLIPMASK1 = 0x01000040
int32_t const dasprclipmask = (cliptype >> 16); // CLIPMASK1 = 0x01000040

vec2_t const move = { xvect, yvect };
vec2_t goal = { pos->x + (xvect >> 14), pos->y + (yvect >> 14) };
Expand Down Expand Up @@ -855,7 +855,7 @@ int pushmove(vec3_t *const vect, int16_t *const sectnum,
int bad;

const int32_t dawalclipmask = (cliptype&65535);
// const int32_t dasprclipmask = FixedToInt(cliptype);
// const int32_t dasprclipmask = (cliptype >> 16);

if (*sectnum < 0)
return -1;
Expand Down Expand Up @@ -981,7 +981,7 @@ void getzrange(const vec3_t *pos, int16_t sectnum,
const int32_t xmax = pos->x+extradist, ymax = pos->y+extradist;

const int32_t dawalclipmask = (cliptype&65535);
const int32_t dasprclipmask = FixedToInt(cliptype);
const int32_t dasprclipmask = (cliptype >> 16);

vec2_t closest = pos->vec2;
if (enginecompatibility_mode == ENGINECOMPATIBILITY_NONE)
Expand Down Expand Up @@ -1296,7 +1296,7 @@ int32_t hitscan(const vec3_t *sv, int16_t sectnum, int32_t vx, int32_t vy, int32
// tmp: { (int32_t)curidx, (spritetype *)curspr, (!=0 if outer sector) }
intptr_t *tmpptr=NULL;
const int32_t dawalclipmask = (cliptype&65535);
const int32_t dasprclipmask = FixedToInt(cliptype);
const int32_t dasprclipmask = (cliptype >> 16);

hit->sect = -1; hit->wall = -1; hit->sprite = -1;
if (sectnum < 0)
Expand Down
2 changes: 1 addition & 1 deletion source/build/src/engine.cpp
Expand Up @@ -505,7 +505,7 @@ int32_t lintersect(const int32_t originX, const int32_t originY, const int32_t o
//
// rintersect (internal)
//
// returns: -1 if didn't intersect, coefficient IntToFixed(x3--x4 fraction) else
// returns: -1 if didn't intersect, coefficient (x3--x4 fraction)<<16 else
int32_t rintersect_old(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,
Expand Down

0 comments on commit c58992a

Please sign in to comment.