mirror of
https://github.com/ZDoom/raze-gles.git
synced 2025-01-28 09:50:42 +00:00
- did some global search & replace to reduce the number of accesses to the tilesiz wrapper.
This commit is contained in:
parent
9a43886be6
commit
b97f12a2eb
8 changed files with 44 additions and 44 deletions
|
@ -1476,11 +1476,11 @@ int32_t hitscan(const vec3_t *sv, int16_t sectnum, int32_t vx, int32_t vy, int32
|
||||||
if (tileLoad(tilenum))
|
if (tileLoad(tilenum))
|
||||||
{
|
{
|
||||||
// daz-intz > 0 && daz-intz < k
|
// daz-intz > 0 && daz-intz < k
|
||||||
int32_t xtex = mulscale16(ucoefup16, tilesiz[tilenum].x);
|
int32_t xtex = mulscale16(ucoefup16, tileWidth(tilenum));
|
||||||
int32_t vcoefup16 = 65536-divscale16(daz-intz, k);
|
int32_t vcoefup16 = 65536-divscale16(daz-intz, k);
|
||||||
int32_t ytex = mulscale16(vcoefup16, tilesiz[tilenum].y);
|
int32_t ytex = mulscale16(vcoefup16, tileHeight(tilenum));
|
||||||
|
|
||||||
auto texel = (tilePtr(tilenum) + tilesiz[tilenum].y*xtex + ytex);
|
auto texel = (tilePtr(tilenum) + tileHeight(tilenum)*xtex + ytex);
|
||||||
if (*texel == TRANSPARENT_INDEX)
|
if (*texel == TRANSPARENT_INDEX)
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
|
@ -199,7 +199,7 @@ static inline void get_wallspr_points(T const * const spr, int32_t *x1, int32_t
|
||||||
dax = sintable[ang&2047]*xrepeat;
|
dax = sintable[ang&2047]*xrepeat;
|
||||||
day = sintable[(ang+1536)&2047]*xrepeat;
|
day = sintable[(ang+1536)&2047]*xrepeat;
|
||||||
|
|
||||||
l = tilesiz[tilenum].x;
|
l = tileWidth(tilenum);
|
||||||
k = (l>>1)+xoff;
|
k = (l>>1)+xoff;
|
||||||
|
|
||||||
*x1 -= mulscale16(dax,k);
|
*x1 -= mulscale16(dax,k);
|
||||||
|
@ -220,7 +220,7 @@ static inline void get_floorspr_points(T const * const spr, int32_t px, int32_t
|
||||||
const int32_t cosang = sintable[(spr->ang+512)&2047];
|
const int32_t cosang = sintable[(spr->ang+512)&2047];
|
||||||
const int32_t sinang = sintable[spr->ang&2047];
|
const int32_t sinang = sintable[spr->ang&2047];
|
||||||
|
|
||||||
vec2_t const span = { tilesiz[tilenum].x, tilesiz[tilenum].y};
|
vec2_t const span = { tileWidth(tilenum), tileHeight(tilenum)};
|
||||||
vec2_t const repeat = { spr->xrepeat, spr->yrepeat };
|
vec2_t const repeat = { spr->xrepeat, spr->yrepeat };
|
||||||
|
|
||||||
vec2_t adjofs = { tileLeftOffset(tilenum) + spr->xoffset, tileTopOffset(tilenum) + spr->yoffset };
|
vec2_t adjofs = { tileLeftOffset(tilenum) + spr->xoffset, tileTopOffset(tilenum) + spr->yoffset };
|
||||||
|
|
|
@ -472,7 +472,7 @@ bool GameInterface::DrawAutomapPlayer(int cposx, int cposy, int czoom, int cang)
|
||||||
l = spr->xrepeat;
|
l = spr->xrepeat;
|
||||||
dax = sintable[k & 2047] * l;
|
dax = sintable[k & 2047] * l;
|
||||||
day = sintable[(k + 1536) & 2047] * l;
|
day = sintable[(k + 1536) & 2047] * l;
|
||||||
l = tilesiz[tilenum].x;
|
l = tileWidth(tilenum);
|
||||||
k = (l >> 1) + xoff;
|
k = (l >> 1) + xoff;
|
||||||
x1 -= mulscale16(dax, k);
|
x1 -= mulscale16(dax, k);
|
||||||
x2 = x1 + mulscale16(dax, l);
|
x2 = x1 + mulscale16(dax, l);
|
||||||
|
@ -505,9 +505,9 @@ bool GameInterface::DrawAutomapPlayer(int cposx, int cposy, int czoom, int cang)
|
||||||
k = spr->ang;
|
k = spr->ang;
|
||||||
cosang = sintable[(k + 512) & 2047];
|
cosang = sintable[(k + 512) & 2047];
|
||||||
sinang = sintable[k & 2047];
|
sinang = sintable[k & 2047];
|
||||||
xspan = tilesiz[tilenum].x;
|
xspan = tileWidth(tilenum);
|
||||||
xrepeat = spr->xrepeat;
|
xrepeat = spr->xrepeat;
|
||||||
yspan = tilesiz[tilenum].y;
|
yspan = tileHeight(tilenum);
|
||||||
yrepeat = spr->yrepeat;
|
yrepeat = spr->yrepeat;
|
||||||
|
|
||||||
dax = ((xspan >> 1) + xoff) * xrepeat;
|
dax = ((xspan >> 1) + xoff) * xrepeat;
|
||||||
|
|
|
@ -338,7 +338,7 @@ static void shootweapon(DDukeActor *actor, int p, int sx, int sy, int sz, int sa
|
||||||
|
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) + (5 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) + (5 << 8);
|
||||||
switch (aimed->s.picnum)
|
switch (aimed->s.picnum)
|
||||||
{
|
{
|
||||||
case GREENSLIME:
|
case GREENSLIME:
|
||||||
|
@ -590,7 +590,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
|
||||||
|
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) - (12 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) - (12 << 8);
|
||||||
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
||||||
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
||||||
}
|
}
|
||||||
|
@ -688,7 +688,7 @@ static void shootrpg(DDukeActor *actor, int p, int sx, int sy, int sz, int sa, i
|
||||||
aimed = aim(actor, 48);
|
aimed = aim(actor, 48);
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) + (8 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) + (8 << 8);
|
||||||
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
||||||
if (aimed->s.picnum != RECON)
|
if (aimed->s.picnum != RECON)
|
||||||
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
||||||
|
@ -925,7 +925,7 @@ static void shootgrowspark(DDukeActor* actor, int p, int sx, int sy, int sz, int
|
||||||
auto aimed = aim(actor, AUTO_AIM_ANGLE);
|
auto aimed = aim(actor, AUTO_AIM_ANGLE);
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) + (5 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) + (5 << 8);
|
||||||
switch (aimed->s.picnum)
|
switch (aimed->s.picnum)
|
||||||
{
|
{
|
||||||
case GREENSLIME:
|
case GREENSLIME:
|
||||||
|
@ -1145,7 +1145,7 @@ void shoot_d(DDukeActor* actor, int atwith)
|
||||||
auto aimed = isNamWW2GI() ? nullptr : aim(actor, AUTO_AIM_ANGLE);
|
auto aimed = isNamWW2GI() ? nullptr : aim(actor, AUTO_AIM_ANGLE);
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1);
|
dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1);
|
||||||
zvel = ((aimed->s.z - sz - dal - (4 << 8)) * 768) / (ldist(ps[p].GetActor(), aimed));
|
zvel = ((aimed->s.z - sz - dal - (4 << 8)) * 768) / (ldist(ps[p].GetActor(), aimed));
|
||||||
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -226,7 +226,7 @@ static void shootweapon(DDukeActor* actor, int p, int sx, int sy, int sz, int sa
|
||||||
auto aimed = aim(actor, AUTO_AIM_ANGLE);
|
auto aimed = aim(actor, AUTO_AIM_ANGLE);
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) + (5 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) + (5 << 8);
|
||||||
zvel = ((aimed->s.z - sz - dal) << 8) / ldist(ps[p].GetActor(), aimed);
|
zvel = ((aimed->s.z - sz - dal) << 8) / ldist(ps[p].GetActor(), aimed);
|
||||||
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
||||||
}
|
}
|
||||||
|
@ -514,7 +514,7 @@ static void shootstuff(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
|
||||||
{
|
{
|
||||||
sx += sintable[(s->ang + 512 + 160) & 2047] >> 7;
|
sx += sintable[(s->ang + 512 + 160) & 2047] >> 7;
|
||||||
sy += sintable[(s->ang + 160) & 2047] >> 7;
|
sy += sintable[(s->ang + 160) & 2047] >> 7;
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) - (12 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) - (12 << 8);
|
||||||
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
||||||
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
||||||
}
|
}
|
||||||
|
@ -631,7 +631,7 @@ static void shootrpg(DDukeActor* actor, int p, int sx, int sy, int sz, int sa, i
|
||||||
else
|
else
|
||||||
act90 = aimed;
|
act90 = aimed;
|
||||||
}
|
}
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) + (8 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) + (8 << 8);
|
||||||
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
||||||
if (aimed->s.picnum != RECON)
|
if (aimed->s.picnum != RECON)
|
||||||
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
||||||
|
@ -785,7 +785,7 @@ static void shootwhip(DDukeActor* actor, int p, int sx, int sy, int sz, int sa,
|
||||||
|
|
||||||
if (aimed)
|
if (aimed)
|
||||||
{
|
{
|
||||||
int dal = ((aimed->s.xrepeat * tilesiz[aimed->s.picnum].y) << 1) - (12 << 8);
|
int dal = ((aimed->s.xrepeat * tileHeight(aimed->s.picnum)) << 1) - (12 << 8);
|
||||||
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
zvel = ((aimed->s.z - sz - dal) * vel) / ldist(ps[p].GetActor(), aimed);
|
||||||
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
sa = getangle(aimed->s.x - sx, aimed->s.y - sy);
|
||||||
}
|
}
|
||||||
|
|
|
@ -824,7 +824,7 @@ int spawn_r(int j, int pn)
|
||||||
sp->xrepeat = 22;
|
sp->xrepeat = 22;
|
||||||
sp->yrepeat = 20;
|
sp->yrepeat = 20;
|
||||||
}
|
}
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case HULKHANG:
|
case HULKHANG:
|
||||||
case HULKHANGDEAD:
|
case HULKHANGDEAD:
|
||||||
|
@ -833,14 +833,14 @@ int spawn_r(int j, int pn)
|
||||||
case HULKSTAYPUT:
|
case HULKSTAYPUT:
|
||||||
sp->xrepeat = 32;
|
sp->xrepeat = 32;
|
||||||
sp->yrepeat = 32;
|
sp->yrepeat = 32;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case COOTPLAY:
|
case COOTPLAY:
|
||||||
case COOT:
|
case COOT:
|
||||||
case COOTSTAYPUT:
|
case COOTSTAYPUT:
|
||||||
sp->xrepeat = 24;
|
sp->xrepeat = 24;
|
||||||
sp->yrepeat = 18;
|
sp->yrepeat = 18;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
sp->clipdist <<= 2;
|
sp->clipdist <<= 2;
|
||||||
break;
|
break;
|
||||||
case DRONE:
|
case DRONE:
|
||||||
|
@ -857,12 +857,12 @@ int spawn_r(int j, int pn)
|
||||||
case BUBBASTAND:
|
case BUBBASTAND:
|
||||||
sp->xrepeat = 25;
|
sp->xrepeat = 25;
|
||||||
sp->yrepeat = 21;
|
sp->yrepeat = 21;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case COW:
|
case COW:
|
||||||
sp->xrepeat = 32;
|
sp->xrepeat = 32;
|
||||||
sp->yrepeat = 32;
|
sp->yrepeat = 32;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case HEN:
|
case HEN:
|
||||||
case HENSTAYPUT:
|
case HENSTAYPUT:
|
||||||
|
@ -871,7 +871,7 @@ int spawn_r(int j, int pn)
|
||||||
{
|
{
|
||||||
sp->xrepeat = 42;
|
sp->xrepeat = 42;
|
||||||
sp->yrepeat = 30;
|
sp->yrepeat = 30;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -884,7 +884,7 @@ int spawn_r(int j, int pn)
|
||||||
case MINIONSTAYPUT:
|
case MINIONSTAYPUT:
|
||||||
sp->xrepeat = 16;
|
sp->xrepeat = 16;
|
||||||
sp->yrepeat = 16;
|
sp->yrepeat = 16;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
if (isRRRA() && ufospawnsminion)
|
if (isRRRA() && ufospawnsminion)
|
||||||
sp->pal = 8;
|
sp->pal = 8;
|
||||||
break;
|
break;
|
||||||
|
@ -892,12 +892,12 @@ int spawn_r(int j, int pn)
|
||||||
case PIG:
|
case PIG:
|
||||||
sp->xrepeat = 16;
|
sp->xrepeat = 16;
|
||||||
sp->yrepeat = 16;
|
sp->yrepeat = 16;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case RABBIT:
|
case RABBIT:
|
||||||
sp->xrepeat = 18;
|
sp->xrepeat = 18;
|
||||||
sp->yrepeat = 18;
|
sp->yrepeat = 18;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case MAMACLOUD:
|
case MAMACLOUD:
|
||||||
sp->xrepeat = 64;
|
sp->xrepeat = 64;
|
||||||
|
@ -947,7 +947,7 @@ int spawn_r(int j, int pn)
|
||||||
case BIKER:
|
case BIKER:
|
||||||
sp->xrepeat = 28;
|
sp->xrepeat = 28;
|
||||||
sp->yrepeat = 22;
|
sp->yrepeat = 22;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case CHEERB:
|
case CHEERB:
|
||||||
sp->xrepeat = 28;
|
sp->xrepeat = 28;
|
||||||
|
@ -958,46 +958,46 @@ int spawn_r(int j, int pn)
|
||||||
case CHEERSTAYPUT:
|
case CHEERSTAYPUT:
|
||||||
sp->xrepeat = 20;
|
sp->xrepeat = 20;
|
||||||
sp->yrepeat = 20;
|
sp->yrepeat = 20;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case MAKEOUT:
|
case MAKEOUT:
|
||||||
sp->xrepeat = 26;
|
sp->xrepeat = 26;
|
||||||
sp->yrepeat = 26;
|
sp->yrepeat = 26;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case MINIONBOAT:
|
case MINIONBOAT:
|
||||||
sp->xrepeat = 16;
|
sp->xrepeat = 16;
|
||||||
sp->yrepeat = 16;
|
sp->yrepeat = 16;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case HULKBOAT:
|
case HULKBOAT:
|
||||||
sp->xrepeat = 48;
|
sp->xrepeat = 48;
|
||||||
sp->yrepeat = 48;
|
sp->yrepeat = 48;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case CHEERBOAT:
|
case CHEERBOAT:
|
||||||
sp->xrepeat = 32;
|
sp->xrepeat = 32;
|
||||||
sp->yrepeat = 32;
|
sp->yrepeat = 32;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case TORNADO:
|
case TORNADO:
|
||||||
sp->xrepeat = 64;
|
sp->xrepeat = 64;
|
||||||
sp->yrepeat = 128;
|
sp->yrepeat = 128;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
sp->clipdist >>= 2;
|
sp->clipdist >>= 2;
|
||||||
sp->cstat = 2;
|
sp->cstat = 2;
|
||||||
break;
|
break;
|
||||||
case LTH:
|
case LTH:
|
||||||
sp->xrepeat = 24;
|
sp->xrepeat = 24;
|
||||||
sp->yrepeat = 22;
|
sp->yrepeat = 22;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
case ROCK:
|
case ROCK:
|
||||||
case ROCK2:
|
case ROCK2:
|
||||||
sp->xrepeat = 64;
|
sp->xrepeat = 64;
|
||||||
sp->yrepeat = 64;
|
sp->yrepeat = 64;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case UFO1_RRRA:
|
case UFO1_RRRA:
|
||||||
|
@ -1008,13 +1008,13 @@ int spawn_r(int j, int pn)
|
||||||
case UFO5:
|
case UFO5:
|
||||||
sp->xrepeat = 32;
|
sp->xrepeat = 32;
|
||||||
sp->yrepeat = 32;
|
sp->yrepeat = 32;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
sp->extra = 50;
|
sp->extra = 50;
|
||||||
break;
|
break;
|
||||||
case SBMOVE:
|
case SBMOVE:
|
||||||
sp->xrepeat = 48;
|
sp->xrepeat = 48;
|
||||||
sp->yrepeat = 48;
|
sp->yrepeat = 48;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
@ -1409,7 +1409,7 @@ int spawn_r(int j, int pn)
|
||||||
sp->pal = 0;
|
sp->pal = 0;
|
||||||
sp->xrepeat = 18;
|
sp->xrepeat = 18;
|
||||||
sp->yrepeat = 18;
|
sp->yrepeat = 18;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
act->saved_ammo = 100;
|
act->saved_ammo = 100;
|
||||||
sp->cstat = 257;
|
sp->cstat = 257;
|
||||||
sp->lotag = 1;
|
sp->lotag = 1;
|
||||||
|
@ -1425,7 +1425,7 @@ int spawn_r(int j, int pn)
|
||||||
sp->pal = 0;
|
sp->pal = 0;
|
||||||
sp->xrepeat = 32;
|
sp->xrepeat = 32;
|
||||||
sp->yrepeat = 32;
|
sp->yrepeat = 32;
|
||||||
sp->clipdist = mulscale7(sp->xrepeat,tilesiz[sp->picnum].x);
|
sp->clipdist = mulscale7(sp->xrepeat,tileWidth(sp->picnum));
|
||||||
act->saved_ammo = 20;
|
act->saved_ammo = 20;
|
||||||
sp->cstat = 257;
|
sp->cstat = 257;
|
||||||
sp->lotag = 1;
|
sp->lotag = 1;
|
||||||
|
|
|
@ -1986,7 +1986,7 @@ bool GameInterface::DrawAutomapPlayer(int cposx, int cposy, int czoom, int cang)
|
||||||
l = spr->xrepeat;
|
l = spr->xrepeat;
|
||||||
dax = sintable[k & 2047] * l;
|
dax = sintable[k & 2047] * l;
|
||||||
day = sintable[(k + 1536) & 2047] * l;
|
day = sintable[(k + 1536) & 2047] * l;
|
||||||
l = tilesiz[tilenum].x;
|
l = tileWidth(tilenum);
|
||||||
k = (l >> 1) + xoff;
|
k = (l >> 1) + xoff;
|
||||||
x1 -= mulscale16(dax, k);
|
x1 -= mulscale16(dax, k);
|
||||||
x2 = x1 + mulscale16(dax, l);
|
x2 = x1 + mulscale16(dax, l);
|
||||||
|
@ -2021,9 +2021,9 @@ bool GameInterface::DrawAutomapPlayer(int cposx, int cposy, int czoom, int cang)
|
||||||
k = spr->ang;
|
k = spr->ang;
|
||||||
cosang = sintable[(k + 512) & 2047];
|
cosang = sintable[(k + 512) & 2047];
|
||||||
sinang = sintable[k];
|
sinang = sintable[k];
|
||||||
xspan = tilesiz[tilenum].x;
|
xspan = tileWidth(tilenum);
|
||||||
xrepeat = spr->xrepeat;
|
xrepeat = spr->xrepeat;
|
||||||
yspan = tilesiz[tilenum].y;
|
yspan = tileHeight(tilenum);
|
||||||
yrepeat = spr->yrepeat;
|
yrepeat = spr->yrepeat;
|
||||||
|
|
||||||
dax = ((xspan >> 1) + xoff) * xrepeat;
|
dax = ((xspan >> 1) + xoff) * xrepeat;
|
||||||
|
|
|
@ -4787,9 +4787,9 @@ getzrangepoint(int x, int y, int z, short sectnum,
|
||||||
// These points will already have (x,y) subtracted from them
|
// These points will already have (x,y) subtracted from them
|
||||||
cosang = sintable[NORM_ANGLE(spr->ang + 512)];
|
cosang = sintable[NORM_ANGLE(spr->ang + 512)];
|
||||||
sinang = sintable[spr->ang];
|
sinang = sintable[spr->ang];
|
||||||
xspan = tilesiz[tilenum].x;
|
xspan = tileWidth(tilenum);
|
||||||
dax = ((xspan >> 1) + xoff) * spr->xrepeat;
|
dax = ((xspan >> 1) + xoff) * spr->xrepeat;
|
||||||
yspan = tilesiz[tilenum].y;
|
yspan = tileHeight(tilenum);
|
||||||
day = ((yspan >> 1) + yoff) * spr->yrepeat;
|
day = ((yspan >> 1) + yoff) * spr->yrepeat;
|
||||||
x1 = spr->x + dmulscale16(sinang, dax, cosang, day) - x;
|
x1 = spr->x + dmulscale16(sinang, dax, cosang, day) - x;
|
||||||
y1 = spr->y + dmulscale16(sinang, day, -cosang, dax) - y;
|
y1 = spr->y + dmulscale16(sinang, day, -cosang, dax) - y;
|
||||||
|
|
Loading…
Reference in a new issue