mirror of
https://github.com/ZDoom/raze-gles.git
synced 2024-12-25 11:10:47 +00:00
Merge branch 'master' into sound
This commit is contained in:
commit
43c66d07ae
4 changed files with 17 additions and 21 deletions
|
@ -510,7 +510,7 @@ EXTERN char *palookup[MAXPALOOKUPS];
|
|||
extern uint8_t *basepaltable[MAXBASEPALS];
|
||||
EXTERN uint8_t paletteloaded;
|
||||
EXTERN char *blendtable[MAXBLENDTABS];
|
||||
EXTERN uint8_t whitecol, redcol;
|
||||
EXTERN uint8_t whitecol, redcol, blackcol;
|
||||
|
||||
EXTERN int32_t maxspritesonscreen;
|
||||
|
||||
|
@ -866,6 +866,7 @@ static FORCE_INLINE void rotatesprite_win(int32_t sx, int32_t sy, int32_t z, int
|
|||
|
||||
void getzrange(const vec3_t *pos, int16_t sectnum, int32_t *ceilz, int32_t *ceilhit, int32_t *florz,
|
||||
int32_t *florhit, int32_t walldist, uint32_t cliptype) ATTRIBUTE((nonnull(1,3,4,5,6)));
|
||||
extern vec2_t hitscangoal;
|
||||
int32_t hitscan(const vec3_t *sv, int16_t sectnum, int32_t vx, int32_t vy, int32_t vz,
|
||||
hitdata_t *hitinfo, uint32_t cliptype) ATTRIBUTE((nonnull(1,6)));
|
||||
void neartag(int32_t xs, int32_t ys, int32_t zs, int16_t sectnum, int16_t ange,
|
||||
|
|
|
@ -78,11 +78,8 @@ static inline int32_t sepldist(const int32_t dx, const int32_t dy)
|
|||
{
|
||||
vec2_t d = { klabs(dx), klabs(dy) };
|
||||
|
||||
if (playing_rr)
|
||||
{
|
||||
if (!d.y) return d.x;
|
||||
if (!d.x) return d.y;
|
||||
}
|
||||
|
||||
if (d.x < d.y)
|
||||
swaplong(&d.x, &d.y);
|
||||
|
|
|
@ -6796,16 +6796,13 @@ void dorotspr_handle_bit2(int32_t *sxptr, int32_t *syptr, int32_t *z, int32_t da
|
|||
int32_t zoomsc, sx=*sxptr, sy=*syptr;
|
||||
int32_t ouryxaspect = yxaspect, ourxyaspect = xyaspect;
|
||||
|
||||
if ((dastat & RS_ALIGN_MASK) && (dastat & RS_ALIGN_MASK) != RS_ALIGN_MASK)
|
||||
sx += NEGATE_ON_CONDITION(scale(120<<16,xdim,ydim) - (160<<16), !(dastat & RS_ALIGN_R));
|
||||
|
||||
sy += rotatesprite_y_offset;
|
||||
|
||||
// screen center to s[xy], 320<<16 coords.
|
||||
const int32_t normxofs = sx-(320<<15), normyofs = sy-(200<<15);
|
||||
|
||||
if (!(dastat & RS_STRETCH) && 4*ydim <= 3*xdim)
|
||||
{
|
||||
if ((dastat & RS_ALIGN_MASK) && (dastat & RS_ALIGN_MASK) != RS_ALIGN_MASK)
|
||||
sx += NEGATE_ON_CONDITION(scale(120<<16,xdim,ydim) - (160<<16), !(dastat & RS_ALIGN_R));
|
||||
|
||||
if ((dastat & RS_ALIGN_MASK) == RS_ALIGN_MASK)
|
||||
ydim = scale(xdim, 3, 4);
|
||||
else
|
||||
|
@ -6818,6 +6815,9 @@ void dorotspr_handle_bit2(int32_t *sxptr, int32_t *syptr, int32_t *z, int32_t da
|
|||
ouryxaspect = mulscale16(ouryxaspect, rotatesprite_yxaspect);
|
||||
ourxyaspect = divscale16(ourxyaspect, rotatesprite_yxaspect);
|
||||
|
||||
// screen center to s[xy], 320<<16 coords.
|
||||
const int32_t normxofs = sx-(320<<15), normyofs = sy-(200<<15);
|
||||
|
||||
// nasty hacks go here
|
||||
if (!(dastat & RS_NOCLIP))
|
||||
{
|
||||
|
@ -7150,7 +7150,7 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
|
|||
|
||||
if (d4 >= u4) vlineasm4(d4-u4+1, (char *)(ylookup[u4]+p));
|
||||
|
||||
i = p+ylookup[d4+1];
|
||||
intptr_t i = p+ylookup[d4+1];
|
||||
if (y2ve[0] > d4) prevlineasm1(vince[0],palookupoffse[0],y2ve[0]-d4-1,vplce[0],bufplce[0],i+0);
|
||||
if (y2ve[1] > d4) prevlineasm1(vince[1],palookupoffse[1],y2ve[1]-d4-1,vplce[1],bufplce[1],i+1);
|
||||
if (y2ve[2] > d4) prevlineasm1(vince[2],palookupoffse[2],y2ve[2]-d4-1,vplce[2],bufplce[2],i+2);
|
||||
|
@ -7174,7 +7174,7 @@ static void dorotatesprite(int32_t sx, int32_t sy, int32_t z, int16_t a, int16_t
|
|||
|
||||
if (d4 >= u4) mvlineasm4(d4-u4+1, (char *)(ylookup[u4]+p));
|
||||
|
||||
i = p+ylookup[d4+1];
|
||||
intptr_t i = p+ylookup[d4+1];
|
||||
if (y2ve[0] > d4) mvlineasm1(vince[0],palookupoffse[0],y2ve[0]-d4-1,vplce[0],bufplce[0],i+0);
|
||||
if (y2ve[1] > d4) mvlineasm1(vince[1],palookupoffse[1],y2ve[1]-d4-1,vplce[1],bufplce[1],i+1);
|
||||
if (y2ve[2] > d4) mvlineasm1(vince[2],palookupoffse[2],y2ve[2]-d4-1,vplce[2],bufplce[2],i+2);
|
||||
|
|
|
@ -28,7 +28,6 @@ palette_t curpalette[256]; // the current palette, unadjusted for brightness o
|
|||
palette_t curpalettefaded[256]; // the current palette, adjusted for brightness and tint (ie. what gets sent to the card)
|
||||
palette_t palfadergb = { 0, 0, 0, 0 };
|
||||
char palfadedelta = 0;
|
||||
uint8_t blackcol;
|
||||
|
||||
int32_t realmaxshade;
|
||||
float frealmaxshade;
|
||||
|
@ -266,13 +265,15 @@ void paletteLoadFromDisk(void)
|
|||
|
||||
// Read the entries above and on the diagonal, if the table is
|
||||
// thought as being row-major.
|
||||
if (read_and_test(fil, &transluc[256*i + i], 256-i-1))
|
||||
if (read_and_test(fil, &transluc[256*i + i + 1], 255-i))
|
||||
return;
|
||||
|
||||
// Duplicate the entries below the diagonal.
|
||||
for (bssize_t j=0; j<i; j++)
|
||||
transluc[256*i + j] = transluc[256*j + i];
|
||||
for (bssize_t j=i+1; j<256; j++)
|
||||
transluc[256*j + i] = transluc[256*i + j];
|
||||
}
|
||||
for (bssize_t i=0; i<256; i++)
|
||||
transluc[256*i + i] = i;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -600,9 +601,6 @@ void handle_blend(uint8_t enable, uint8_t blend, uint8_t def)
|
|||
|
||||
int32_t paletteSetLookupTable(int32_t palnum, const uint8_t *shtab)
|
||||
{
|
||||
if (numshades != 32)
|
||||
return -1;
|
||||
|
||||
if (shtab != NULL)
|
||||
{
|
||||
maybe_alloc_palookup(palnum);
|
||||
|
|
Loading…
Reference in a new issue