mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-16 01:11:44 +00:00
Re-enable the use of psky_t's yoffset.
git-svn-id: https://svn.eduke32.com/eduke32@5896 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
52e6cd09cf
commit
527181f151
4 changed files with 16 additions and 15 deletions
|
@ -3577,9 +3577,6 @@ static void parascan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat, i
|
|||
int32_t j, k, l, m, n, x, z, wallnum, nextsectnum, globalhorizbak;
|
||||
int16_t *topptr, *botptr;
|
||||
|
||||
int32_t dapyscale, dapskybits;
|
||||
const int8_t *dapskyoff;
|
||||
|
||||
int32_t logtilesizy, tsizy;
|
||||
|
||||
UNREFERENCED_PARAMETER(dax1);
|
||||
|
@ -3623,7 +3620,9 @@ static void parascan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat, i
|
|||
if (tsizy==0)
|
||||
return;
|
||||
|
||||
dapskyoff = getpsky(globalpicnum, &dapyscale, &dapskybits);
|
||||
|
||||
int32_t dapyscale, dapskybits, dapyoffs;
|
||||
int8_t const * const dapskyoff = getpsky(globalpicnum, &dapyscale, &dapskybits, &dapyoffs);
|
||||
|
||||
globalshiftval = logtilesizy;
|
||||
|
||||
|
@ -3637,14 +3636,14 @@ static void parascan(int32_t dax1, int32_t dax2, int32_t sectnum, char dastat, i
|
|||
globaltilesizy = tsizy;
|
||||
globalyscale = 65536 / tsizy;
|
||||
globalshiftval = 0;
|
||||
globalzd = divscale32(((tsizy>>1)+parallaxyoffs_override/*+g_psky.yoffs*/), tsizy) + ((uint32_t)globalypanning<<24);
|
||||
globalzd = divscale32(((tsizy>>1)+dapyoffs), tsizy) + ((uint32_t)globalypanning<<24);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
globalshiftval = 32-globalshiftval;
|
||||
globalyscale = (8<<(globalshiftval-19));
|
||||
globalzd = (((tsizy>>1)+parallaxyoffs_override/*+g_psky.yoffs*/)<<globalshiftval) + ((uint32_t)globalypanning<<24);
|
||||
globalzd = (((tsizy>>1)+dapyoffs)<<globalshiftval) + ((uint32_t)globalypanning<<24);
|
||||
}
|
||||
|
||||
//if (globalorientation&256) globalyscale = -globalyscale, globalzd = -globalzd;
|
||||
|
|
|
@ -441,8 +441,8 @@ FORCE_INLINE void setgotpic(int32_t tilenume)
|
|||
#endif
|
||||
|
||||
// Get properties of parallaxed sky to draw.
|
||||
// Returns: pointer to tile offset array. Sets-by-pointer the other two.
|
||||
static inline const int8_t *getpsky(int32_t picnum, int32_t *dapyscale, int32_t *dapskybits)
|
||||
// Returns: pointer to tile offset array. Sets-by-pointer the other three.
|
||||
FORCE_INLINE const int8_t *getpsky(int32_t picnum, int32_t *dapyscale, int32_t *dapskybits, int32_t *dapyoffs)
|
||||
{
|
||||
psky_t const * const psky = &multipsky[getpskyidx(picnum)];
|
||||
|
||||
|
@ -450,6 +450,8 @@ static inline const int8_t *getpsky(int32_t picnum, int32_t *dapyscale, int32_t
|
|||
*dapskybits = (pskybits_override == -1 ? psky->lognumtiles : pskybits_override);
|
||||
if (dapyscale)
|
||||
*dapyscale = (parallaxyscale_override == 0 ? psky->horizfrac : parallaxyscale_override);
|
||||
if (dapyoffs)
|
||||
*dapyoffs = psky->yoffs + parallaxyoffs_override;
|
||||
|
||||
return psky->tileofs;
|
||||
}
|
||||
|
|
|
@ -4100,7 +4100,7 @@ static void polymer_getsky(void)
|
|||
curskypal = sector[i].ceilingpal;
|
||||
curskyshade = sector[i].ceilingshade;
|
||||
|
||||
getpsky(cursky, &horizfrac, NULL);
|
||||
getpsky(cursky, &horizfrac, NULL, NULL);
|
||||
|
||||
switch (horizfrac)
|
||||
{
|
||||
|
@ -4176,7 +4176,7 @@ static void polymer_drawartsky(int16_t tilenum, char palnum, int8_t shad
|
|||
GLfloat height = 2.45f / 2.0f;
|
||||
|
||||
int32_t dapskybits;
|
||||
const int8_t *dapskyoff = getpsky(tilenum, NULL, &dapskybits);
|
||||
const int8_t *dapskyoff = getpsky(tilenum, NULL, &dapskybits, NULL);
|
||||
const int32_t numskytilesm1 = (1<<dapskybits)-1;
|
||||
|
||||
i = 0;
|
||||
|
|
|
@ -2927,8 +2927,8 @@ static void polymost_drawalls(int32_t const bunch)
|
|||
|
||||
DO_TILE_ANIM(globalpicnum, sectnum);
|
||||
|
||||
int32_t dapskybits;
|
||||
int8_t const * dapskyoff = getpsky(globalpicnum, NULL, &dapskybits);
|
||||
int32_t dapskybits, dapyoffs;
|
||||
int8_t const * dapskyoff = getpsky(globalpicnum, NULL, &dapskybits, &dapyoffs);
|
||||
|
||||
global_cf_fogpal = sec->fogpal;
|
||||
global_cf_shade = sec->floorshade, global_cf_pal = sec->floorpal; global_cf_z = sec->floorz; // REFACT
|
||||
|
@ -2958,7 +2958,7 @@ static void polymost_drawalls(int32_t const bunch)
|
|||
float vv[2];
|
||||
float t = (float)((1<<(picsiz[globalpicnum]&15))<<dapskybits);
|
||||
vv[1] = dd*((float)xdimscale*fviewingrange) * (1.f/(65536.f*65536.f));
|
||||
vv[0] = dd*((float)((tilesiz[globalpicnum].y>>1)+parallaxyoffs_override/*+g_psky.yoffs*/)) - vv[1]*ghoriz;
|
||||
vv[0] = dd*((float)((tilesiz[globalpicnum].y>>1)+dapyoffs)) - vv[1]*ghoriz;
|
||||
int i = (1<<(picsiz[globalpicnum]>>4)); if (i != tilesiz[globalpicnum].y) i += i;
|
||||
vec3f_t o;
|
||||
|
||||
|
@ -3220,7 +3220,7 @@ static void polymost_drawalls(int32_t const bunch)
|
|||
DO_TILE_ANIM(globalpicnum, sectnum);
|
||||
|
||||
|
||||
dapskyoff = getpsky(globalpicnum, NULL, &dapskybits);
|
||||
dapskyoff = getpsky(globalpicnum, NULL, &dapskybits, &dapyoffs);
|
||||
|
||||
global_cf_fogpal = sec->fogpal;
|
||||
global_cf_shade = sec->ceilingshade, global_cf_pal = sec->ceilingpal; global_cf_z = sec->ceilingz; // REFACT
|
||||
|
@ -3250,7 +3250,7 @@ static void polymost_drawalls(int32_t const bunch)
|
|||
float vv[2];
|
||||
float t = (float)((1<<(picsiz[globalpicnum]&15))<<dapskybits);
|
||||
vv[1] = dd*((float)xdimscale*fviewingrange) * (1.f/(65536.f*65536.f));
|
||||
vv[0] = dd*((float)((tilesiz[globalpicnum].y>>1)+parallaxyoffs_override/*+g_psky.yoffs*/)) - vv[1]*ghoriz;
|
||||
vv[0] = dd*((float)((tilesiz[globalpicnum].y>>1)+dapyoffs)) - vv[1]*ghoriz;
|
||||
int i = (1<<(picsiz[globalpicnum]>>4)); if (i != tilesiz[globalpicnum].y) i += i;
|
||||
vec3f_t o;
|
||||
|
||||
|
|
Loading…
Reference in a new issue