mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-23 12:52:57 +00:00
Delete ROTSPRITE
This commit is contained in:
parent
c02fcc6ce2
commit
37be2d0f5f
10 changed files with 6 additions and 57 deletions
|
@ -719,7 +719,6 @@ extern int
|
||||||
#define SECTORSPECIALSAFTERTHINK
|
#define SECTORSPECIALSAFTERTHINK
|
||||||
|
|
||||||
/// Sprite rotation
|
/// Sprite rotation
|
||||||
#define ROTSPRITE
|
|
||||||
#define ROTANGLES 72 // Needs to be a divisor of 360 (45, 60, 90, 120...)
|
#define ROTANGLES 72 // Needs to be a divisor of 360 (45, 60, 90, 120...)
|
||||||
#define ROTANGDIFF (360 / ROTANGLES)
|
#define ROTANGDIFF (360 / ROTANGLES)
|
||||||
|
|
||||||
|
|
|
@ -2447,11 +2447,11 @@ static void HWR_Subsector(size_t num)
|
||||||
continue;
|
continue;
|
||||||
if (sub->validcount == validcount)
|
if (sub->validcount == validcount)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
// rendering heights for bottom and top planes
|
// rendering heights for bottom and top planes
|
||||||
bottomCullHeight = P_GetFFloorBottomZAt(rover, viewx, viewy);
|
bottomCullHeight = P_GetFFloorBottomZAt(rover, viewx, viewy);
|
||||||
topCullHeight = P_GetFFloorTopZAt(rover, viewx, viewy);
|
topCullHeight = P_GetFFloorTopZAt(rover, viewx, viewy);
|
||||||
|
|
||||||
if (gl_frontsector->cullheight)
|
if (gl_frontsector->cullheight)
|
||||||
{
|
{
|
||||||
if (HWR_DoCulling(gl_frontsector->cullheight, viewsector->cullheight, gl_viewz, FIXED_TO_FLOAT(bottomCullHeight), FIXED_TO_FLOAT(topCullHeight)))
|
if (HWR_DoCulling(gl_frontsector->cullheight, viewsector->cullheight, gl_viewz, FIXED_TO_FLOAT(bottomCullHeight), FIXED_TO_FLOAT(topCullHeight)))
|
||||||
|
@ -3291,7 +3291,7 @@ static void HWR_DrawBoundingBox(gl_vissprite_t *vis)
|
||||||
v[15].y = v[16].y = v[17].y = v[21].y = v[22].y = v[23].y = vis->gzt; // top
|
v[15].y = v[16].y = v[17].y = v[21].y = v[22].y = v[23].y = vis->gzt; // top
|
||||||
|
|
||||||
Surf.PolyColor = V_GetColor(R_GetBoundingBoxColor(vis->mobj));
|
Surf.PolyColor = V_GetColor(R_GetBoundingBoxColor(vis->mobj));
|
||||||
|
|
||||||
HWR_ProcessPolygon(&Surf, v, 24, (cv_renderhitboxgldepth.value ? 0 : PF_NoDepthTest)|PF_Modulated|PF_NoTexture|PF_WireFrame, SHADER_NONE, false);
|
HWR_ProcessPolygon(&Surf, v, 24, (cv_renderhitboxgldepth.value ? 0 : PF_NoDepthTest)|PF_Modulated|PF_NoTexture|PF_WireFrame, SHADER_NONE, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4254,9 +4254,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
float gz, gzt;
|
float gz, gzt;
|
||||||
spritedef_t *sprdef;
|
spritedef_t *sprdef;
|
||||||
spriteframe_t *sprframe;
|
spriteframe_t *sprframe;
|
||||||
#ifdef ROTSPRITE
|
|
||||||
spriteinfo_t *sprinfo;
|
spriteinfo_t *sprinfo;
|
||||||
#endif
|
|
||||||
md2_t *md2;
|
md2_t *md2;
|
||||||
size_t lumpoff;
|
size_t lumpoff;
|
||||||
unsigned rot;
|
unsigned rot;
|
||||||
|
@ -4276,11 +4274,9 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
|
|
||||||
fixed_t spr_width, spr_height;
|
fixed_t spr_width, spr_height;
|
||||||
fixed_t spr_offset, spr_topoffset;
|
fixed_t spr_offset, spr_topoffset;
|
||||||
#ifdef ROTSPRITE
|
|
||||||
patch_t *rotsprite = NULL;
|
patch_t *rotsprite = NULL;
|
||||||
INT32 rollangle = 0;
|
INT32 rollangle = 0;
|
||||||
angle_t spriterotangle = 0;
|
angle_t spriterotangle = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
// uncapped/interpolation
|
// uncapped/interpolation
|
||||||
interpmobjstate_t interp = {0};
|
interpmobjstate_t interp = {0};
|
||||||
|
@ -4365,16 +4361,12 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
if (thing->skin && thing->sprite == SPR_PLAY)
|
if (thing->skin && thing->sprite == SPR_PLAY)
|
||||||
{
|
{
|
||||||
sprdef = P_GetSkinSpritedef(thing->skin, thing->sprite2);
|
sprdef = P_GetSkinSpritedef(thing->skin, thing->sprite2);
|
||||||
#ifdef ROTSPRITE
|
|
||||||
sprinfo = P_GetSkinSpriteInfo(thing->skin, thing->sprite2);
|
sprinfo = P_GetSkinSpriteInfo(thing->skin, thing->sprite2);
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprdef = &sprites[thing->sprite];
|
sprdef = &sprites[thing->sprite];
|
||||||
#ifdef ROTSPRITE
|
|
||||||
sprinfo = &spriteinfo[thing->sprite];
|
sprinfo = &spriteinfo[thing->sprite];
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (rot >= sprdef->numframes)
|
if (rot >= sprdef->numframes)
|
||||||
|
@ -4384,9 +4376,7 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
thing->sprite = states[S_UNKNOWN].sprite;
|
thing->sprite = states[S_UNKNOWN].sprite;
|
||||||
thing->frame = states[S_UNKNOWN].frame;
|
thing->frame = states[S_UNKNOWN].frame;
|
||||||
sprdef = &sprites[thing->sprite];
|
sprdef = &sprites[thing->sprite];
|
||||||
#ifdef ROTSPRITE
|
|
||||||
sprinfo = &spriteinfo[thing->sprite];
|
sprinfo = &spriteinfo[thing->sprite];
|
||||||
#endif
|
|
||||||
rot = thing->frame&FF_FRAMEMASK;
|
rot = thing->frame&FF_FRAMEMASK;
|
||||||
thing->state->sprite = thing->sprite;
|
thing->state->sprite = thing->sprite;
|
||||||
thing->state->frame = thing->frame;
|
thing->state->frame = thing->frame;
|
||||||
|
@ -4451,7 +4441,6 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
spr_offset = spritecachedinfo[lumpoff].offset;
|
spr_offset = spritecachedinfo[lumpoff].offset;
|
||||||
spr_topoffset = spritecachedinfo[lumpoff].topoffset;
|
spr_topoffset = spritecachedinfo[lumpoff].topoffset;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
spriterotangle = R_SpriteRotationAngle(&interp);
|
spriterotangle = R_SpriteRotationAngle(&interp);
|
||||||
|
|
||||||
if (spriterotangle != 0
|
if (spriterotangle != 0
|
||||||
|
@ -4481,7 +4470,6 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
flip = 0;
|
flip = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (thing->renderflags & RF_ABSOLUTEOFFSETS)
|
if (thing->renderflags & RF_ABSOLUTEOFFSETS)
|
||||||
{
|
{
|
||||||
|
@ -4689,14 +4677,12 @@ static void HWR_ProjectSprite(mobj_t *thing)
|
||||||
|
|
||||||
vis->rotated = false;
|
vis->rotated = false;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
if (rotsprite)
|
if (rotsprite)
|
||||||
{
|
{
|
||||||
vis->gpatch = (patch_t *)rotsprite;
|
vis->gpatch = (patch_t *)rotsprite;
|
||||||
vis->rotated = true;
|
vis->rotated = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
|
||||||
vis->gpatch = (patch_t *)W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE);
|
vis->gpatch = (patch_t *)W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE);
|
||||||
|
|
||||||
vis->mobj = thing;
|
vis->mobj = thing;
|
||||||
|
|
|
@ -522,7 +522,6 @@ static int libd_getSpritePatch(lua_State *L)
|
||||||
if (angle >= ((sprframe->rotate & SRF_3DGE) ? 16 : 8)) // out of range?
|
if (angle >= ((sprframe->rotate & SRF_3DGE) ? 16 : 8)) // out of range?
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
if (lua_isnumber(L, 4))
|
if (lua_isnumber(L, 4))
|
||||||
{
|
{
|
||||||
// rotsprite?????
|
// rotsprite?????
|
||||||
|
@ -537,7 +536,6 @@ static int libd_getSpritePatch(lua_State *L)
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// push both the patch and it's "flip" value
|
// push both the patch and it's "flip" value
|
||||||
LUA_PushUserdata(L, W_CachePatchNum(sprframe->lumppat[angle], PU_SPRITE), META_PATCH);
|
LUA_PushUserdata(L, W_CachePatchNum(sprframe->lumppat[angle], PU_SPRITE), META_PATCH);
|
||||||
|
@ -633,7 +631,6 @@ static int libd_getSprite2Patch(lua_State *L)
|
||||||
if (angle >= ((sprframe->rotate & SRF_3DGE) ? 16 : 8)) // out of range?
|
if (angle >= ((sprframe->rotate & SRF_3DGE) ? 16 : 8)) // out of range?
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
if (lua_isnumber(L, 4))
|
if (lua_isnumber(L, 4))
|
||||||
{
|
{
|
||||||
// rotsprite?????
|
// rotsprite?????
|
||||||
|
@ -648,7 +645,6 @@ static int libd_getSprite2Patch(lua_State *L)
|
||||||
return 3;
|
return 3;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
// push both the patch and it's "flip" value
|
// push both the patch and it's "flip" value
|
||||||
LUA_PushUserdata(L, W_CachePatchNum(sprframe->lumppat[angle], PU_SPRITE), META_PATCH);
|
LUA_PushUserdata(L, W_CachePatchNum(sprframe->lumppat[angle], PU_SPRITE), META_PATCH);
|
||||||
|
|
|
@ -915,7 +915,7 @@ void P_NightserizePlayer(player_t *player, INT32 nighttime)
|
||||||
player->textvar = NTV_BONUSTIMEEND; // Score and grades
|
player->textvar = NTV_BONUSTIMEEND; // Score and grades
|
||||||
player->finishedspheres = (INT16)(player->spheres);
|
player->finishedspheres = (INT16)(player->spheres);
|
||||||
player->finishedrings = (INT16)(player->rings);
|
player->finishedrings = (INT16)(player->rings);
|
||||||
|
|
||||||
// Add score to temp leaderboards
|
// Add score to temp leaderboards
|
||||||
player->lastmaretime = leveltime - player->marebegunat;
|
player->lastmaretime = leveltime - player->marebegunat;
|
||||||
G_AddTempNightsRecords(player, player->marescore, player->lastmaretime, (UINT8)(oldmare + 1));
|
G_AddTempNightsRecords(player, player->marescore, player->lastmaretime, (UINT8)(oldmare + 1));
|
||||||
|
@ -7377,7 +7377,7 @@ static void P_NiGHTSMovement(player_t *player)
|
||||||
else
|
else
|
||||||
player->mo->momz = 0;
|
player->mo->momz = 0;
|
||||||
|
|
||||||
#if 0//def ROTSPRITE
|
#if 0
|
||||||
if (!(player->charflags & SF_NONIGHTSROTATION) && player->mo->momz)
|
if (!(player->charflags & SF_NONIGHTSROTATION) && player->mo->momz)
|
||||||
{
|
{
|
||||||
if (player->mo->state != &states[S_PLAY_NIGHTS_DRILL])
|
if (player->mo->state != &states[S_PLAY_NIGHTS_DRILL])
|
||||||
|
@ -8766,7 +8766,7 @@ void P_MovePlayer(player_t *player)
|
||||||
if (!(player->mo->momz || player->mo->momx || player->mo->momy) && !(player->mo->eflags & MFE_GOOWATER)
|
if (!(player->mo->momz || player->mo->momx || player->mo->momy) && !(player->mo->eflags & MFE_GOOWATER)
|
||||||
&& player->panim == PA_IDLE && !(player->powers[pw_carry]))
|
&& player->panim == PA_IDLE && !(player->powers[pw_carry]))
|
||||||
P_DoTeeter(player);
|
P_DoTeeter(player);
|
||||||
|
|
||||||
// Toss a flag
|
// Toss a flag
|
||||||
if (G_GametypeHasTeams() && (cmd->buttons & BT_TOSSFLAG) && !(player->powers[pw_super]) && !(player->tossdelay))
|
if (G_GametypeHasTeams() && (cmd->buttons & BT_TOSSFLAG) && !(player->powers[pw_super]) && !(player->tossdelay))
|
||||||
{
|
{
|
||||||
|
|
|
@ -851,13 +851,11 @@ typedef struct drawseg_s
|
||||||
vertex_t leftpos, rightpos; // Used for rendering FOF walls with slopes
|
vertex_t leftpos, rightpos; // Used for rendering FOF walls with slopes
|
||||||
} drawseg_t;
|
} drawseg_t;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
typedef struct
|
typedef struct
|
||||||
{
|
{
|
||||||
INT32 angles;
|
INT32 angles;
|
||||||
void **patches;
|
void **patches;
|
||||||
} rotsprite_t;
|
} rotsprite_t;
|
||||||
#endif
|
|
||||||
|
|
||||||
// Patches.
|
// Patches.
|
||||||
// A patch holds one or more columns.
|
// A patch holds one or more columns.
|
||||||
|
@ -876,9 +874,7 @@ typedef struct
|
||||||
void *hardware; // OpenGL patch, allocated whenever necessary
|
void *hardware; // OpenGL patch, allocated whenever necessary
|
||||||
void *flats[4]; // The patch as flats
|
void *flats[4]; // The patch as flats
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
rotsprite_t *rotated; // Rotated patches
|
rotsprite_t *rotated; // Rotated patches
|
||||||
#endif
|
|
||||||
} patch_t;
|
} patch_t;
|
||||||
|
|
||||||
#if defined(_MSC_VER)
|
#if defined(_MSC_VER)
|
||||||
|
@ -971,9 +967,7 @@ typedef struct
|
||||||
// Flip bits (1 = flip) to use for view angles 0-7/15.
|
// Flip bits (1 = flip) to use for view angles 0-7/15.
|
||||||
UINT16 flip;
|
UINT16 flip;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
rotsprite_t *rotated[16]; // Rotated patches
|
rotsprite_t *rotated[16]; // Rotated patches
|
||||||
#endif
|
|
||||||
} spriteframe_t;
|
} spriteframe_t;
|
||||||
|
|
||||||
#define MAXFRAMENUM 256
|
#define MAXFRAMENUM 256
|
||||||
|
|
|
@ -137,7 +137,6 @@ static void Patch_FreeData(patch_t *patch)
|
||||||
Z_Free(patch->flats[i]);
|
Z_Free(patch->flats[i]);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
if (patch->rotated)
|
if (patch->rotated)
|
||||||
{
|
{
|
||||||
rotsprite_t *rotsprite = patch->rotated;
|
rotsprite_t *rotsprite = patch->rotated;
|
||||||
|
@ -151,7 +150,6 @@ static void Patch_FreeData(patch_t *patch)
|
||||||
Z_Free(rotsprite->patches);
|
Z_Free(rotsprite->patches);
|
||||||
Z_Free(rotsprite);
|
Z_Free(rotsprite);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (patch->pixels)
|
if (patch->pixels)
|
||||||
Z_Free(patch->pixels);
|
Z_Free(patch->pixels);
|
||||||
|
|
|
@ -34,7 +34,6 @@ void *Patch_AllocateHardwarePatch(patch_t *patch);
|
||||||
void *Patch_CreateGL(patch_t *patch);
|
void *Patch_CreateGL(patch_t *patch);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
void Patch_Rotate(patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip);
|
void Patch_Rotate(patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip);
|
||||||
patch_t *Patch_GetRotated(patch_t *patch, INT32 angle, boolean flip);
|
patch_t *Patch_GetRotated(patch_t *patch, INT32 angle, boolean flip);
|
||||||
patch_t *Patch_GetRotatedSprite(
|
patch_t *Patch_GetRotatedSprite(
|
||||||
|
@ -45,6 +44,5 @@ patch_t *Patch_GetRotatedSprite(
|
||||||
angle_t R_ModelRotationAngle(interpmobjstate_t *interp);
|
angle_t R_ModelRotationAngle(interpmobjstate_t *interp);
|
||||||
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp);
|
angle_t R_SpriteRotationAngle(interpmobjstate_t *interp);
|
||||||
INT32 R_GetRollAngle(angle_t rollangle);
|
INT32 R_GetRollAngle(angle_t rollangle);
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif // __R_PATCH__
|
#endif // __R_PATCH__
|
||||||
|
|
|
@ -15,7 +15,6 @@
|
||||||
#include "w_wad.h"
|
#include "w_wad.h"
|
||||||
#include "r_main.h" // R_PointToAngle
|
#include "r_main.h" // R_PointToAngle
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
fixed_t rollcosang[ROTANGLES];
|
fixed_t rollcosang[ROTANGLES];
|
||||||
fixed_t rollsinang[ROTANGLES];
|
fixed_t rollsinang[ROTANGLES];
|
||||||
|
|
||||||
|
@ -285,4 +284,3 @@ void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle
|
||||||
rotated->leftoffset = ox;
|
rotated->leftoffset = ox;
|
||||||
rotated->topoffset = oy;
|
rotated->topoffset = oy;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
|
@ -12,10 +12,8 @@
|
||||||
#include "r_patch.h"
|
#include "r_patch.h"
|
||||||
#include "r_picformats.h"
|
#include "r_picformats.h"
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
rotsprite_t *RotatedPatch_Create(INT32 numangles);
|
rotsprite_t *RotatedPatch_Create(INT32 numangles);
|
||||||
void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip);
|
void RotatedPatch_DoRotation(rotsprite_t *rotsprite, patch_t *patch, INT32 angle, INT32 xpivot, INT32 ypivot, boolean flip);
|
||||||
|
|
||||||
extern fixed_t rollcosang[ROTANGLES];
|
extern fixed_t rollcosang[ROTANGLES];
|
||||||
extern fixed_t rollsinang[ROTANGLES];
|
extern fixed_t rollsinang[ROTANGLES];
|
||||||
#endif
|
|
||||||
|
|
|
@ -148,12 +148,10 @@ static void R_InstallSpriteLump(UINT16 wad, // graphics patch
|
||||||
if (maxframe ==(size_t)-1 || frame > maxframe)
|
if (maxframe ==(size_t)-1 || frame > maxframe)
|
||||||
maxframe = frame;
|
maxframe = frame;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
for (r = 0; r < 16; r++)
|
for (r = 0; r < 16; r++)
|
||||||
{
|
{
|
||||||
sprtemp[frame].rotated[r] = NULL;
|
sprtemp[frame].rotated[r] = NULL;
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
if (rotation == 0)
|
if (rotation == 0)
|
||||||
{
|
{
|
||||||
|
@ -731,22 +729,18 @@ static vissprite_t *visspritechunks[MAXVISSPRITES >> VISSPRITECHUNKBITS] = {NULL
|
||||||
void R_InitSprites(void)
|
void R_InitSprites(void)
|
||||||
{
|
{
|
||||||
size_t i;
|
size_t i;
|
||||||
#ifdef ROTSPRITE
|
|
||||||
INT32 angle;
|
INT32 angle;
|
||||||
float fa;
|
float fa;
|
||||||
#endif
|
|
||||||
|
|
||||||
for (i = 0; i < MAXVIDWIDTH; i++)
|
for (i = 0; i < MAXVIDWIDTH; i++)
|
||||||
negonearray[i] = -1;
|
negonearray[i] = -1;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
for (angle = 1; angle < ROTANGLES; angle++)
|
for (angle = 1; angle < ROTANGLES; angle++)
|
||||||
{
|
{
|
||||||
fa = ANG2RAD(FixedAngle((ROTANGDIFF * angle)<<FRACBITS));
|
fa = ANG2RAD(FixedAngle((ROTANGDIFF * angle)<<FRACBITS));
|
||||||
rollcosang[angle] = FLOAT_TO_FIXED(cos(-fa));
|
rollcosang[angle] = FLOAT_TO_FIXED(cos(-fa));
|
||||||
rollsinang[angle] = FLOAT_TO_FIXED(sin(-fa));
|
rollsinang[angle] = FLOAT_TO_FIXED(sin(-fa));
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
//
|
//
|
||||||
// count the number of sprite names, and allocate sprites table
|
// count the number of sprite names, and allocate sprites table
|
||||||
|
@ -1700,9 +1694,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
|
|
||||||
spritedef_t *sprdef;
|
spritedef_t *sprdef;
|
||||||
spriteframe_t *sprframe;
|
spriteframe_t *sprframe;
|
||||||
#ifdef ROTSPRITE
|
|
||||||
spriteinfo_t *sprinfo;
|
spriteinfo_t *sprinfo;
|
||||||
#endif
|
|
||||||
size_t lump;
|
size_t lump;
|
||||||
|
|
||||||
size_t frame, rot;
|
size_t frame, rot;
|
||||||
|
@ -1747,11 +1739,9 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
fixed_t spr_width, spr_height;
|
fixed_t spr_width, spr_height;
|
||||||
fixed_t spr_offset, spr_topoffset;
|
fixed_t spr_offset, spr_topoffset;
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
patch_t *rotsprite = NULL;
|
patch_t *rotsprite = NULL;
|
||||||
INT32 rollangle = 0;
|
INT32 rollangle = 0;
|
||||||
angle_t spriterotangle = 0;
|
angle_t spriterotangle = 0;
|
||||||
#endif
|
|
||||||
|
|
||||||
// uncapped/interpolation
|
// uncapped/interpolation
|
||||||
interpmobjstate_t interp = {0};
|
interpmobjstate_t interp = {0};
|
||||||
|
@ -1807,9 +1797,7 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
if (thing->skin && thing->sprite == SPR_PLAY)
|
if (thing->skin && thing->sprite == SPR_PLAY)
|
||||||
{
|
{
|
||||||
sprdef = P_GetSkinSpritedef(thing->skin, thing->sprite2);
|
sprdef = P_GetSkinSpritedef(thing->skin, thing->sprite2);
|
||||||
#ifdef ROTSPRITE
|
|
||||||
sprinfo = P_GetSkinSpriteInfo(thing->skin, thing->sprite2);
|
sprinfo = P_GetSkinSpriteInfo(thing->skin, thing->sprite2);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (frame >= sprdef->numframes)
|
if (frame >= sprdef->numframes)
|
||||||
{
|
{
|
||||||
|
@ -1817,18 +1805,14 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
thing->sprite = states[S_UNKNOWN].sprite;
|
thing->sprite = states[S_UNKNOWN].sprite;
|
||||||
thing->frame = states[S_UNKNOWN].frame;
|
thing->frame = states[S_UNKNOWN].frame;
|
||||||
sprdef = &sprites[thing->sprite];
|
sprdef = &sprites[thing->sprite];
|
||||||
#ifdef ROTSPRITE
|
|
||||||
sprinfo = &spriteinfo[thing->sprite];
|
sprinfo = &spriteinfo[thing->sprite];
|
||||||
#endif
|
|
||||||
frame = thing->frame&FF_FRAMEMASK;
|
frame = thing->frame&FF_FRAMEMASK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
sprdef = &sprites[thing->sprite];
|
sprdef = &sprites[thing->sprite];
|
||||||
#ifdef ROTSPRITE
|
|
||||||
sprinfo = &spriteinfo[thing->sprite];
|
sprinfo = &spriteinfo[thing->sprite];
|
||||||
#endif
|
|
||||||
|
|
||||||
if (frame >= sprdef->numframes)
|
if (frame >= sprdef->numframes)
|
||||||
{
|
{
|
||||||
|
@ -1905,7 +1889,6 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
// than lumpid for sprites-in-pwad : the graphics are patched
|
// than lumpid for sprites-in-pwad : the graphics are patched
|
||||||
patch = W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE);
|
patch = W_CachePatchNum(sprframe->lumppat[rot], PU_SPRITE);
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
spriterotangle = R_SpriteRotationAngle(&interp);
|
spriterotangle = R_SpriteRotationAngle(&interp);
|
||||||
|
|
||||||
if (spriterotangle != 0
|
if (spriterotangle != 0
|
||||||
|
@ -1938,7 +1921,6 @@ static void R_ProjectSprite(mobj_t *thing)
|
||||||
flip = 0;
|
flip = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
flip = !flip != !hflip;
|
flip = !flip != !hflip;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue