mirror of
https://git.do.srb2.org/STJr/SRB2.git
synced 2024-11-15 09:11:48 +00:00
AA trees are not needed at all for rotated patches
This commit is contained in:
parent
5a2ad5c2f3
commit
b8625d9efb
5 changed files with 4 additions and 28 deletions
|
@ -1388,23 +1388,6 @@ GLPatch_t *HWR_GetCachedGLPatch(lumpnum_t lumpnum)
|
||||||
return HWR_GetCachedGLPatchPwad(WADFILENUM(lumpnum),LUMPNUM(lumpnum));
|
return HWR_GetCachedGLPatchPwad(WADFILENUM(lumpnum),LUMPNUM(lumpnum));
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ROTSPRITE
|
|
||||||
GLPatch_t *HWR_GetCachedGLRotSprite(aatree_t *hwrcache, UINT16 rollangle, patch_t *rawpatch)
|
|
||||||
{
|
|
||||||
GLPatch_t *grpatch;
|
|
||||||
|
|
||||||
if (!(grpatch = M_AATreeGet(hwrcache, rollangle)))
|
|
||||||
{
|
|
||||||
grpatch = Z_Calloc(sizeof(GLPatch_t), PU_HWRPATCHINFO, NULL);
|
|
||||||
grpatch->rawpatch = rawpatch;
|
|
||||||
grpatch->mipmap = Z_Calloc(sizeof(GLMipmap_t), PU_HWRPATCHINFO, NULL);
|
|
||||||
M_AATreeSet(hwrcache, rollangle, grpatch);
|
|
||||||
}
|
|
||||||
|
|
||||||
return grpatch;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Need to do this because they aren't powers of 2
|
// Need to do this because they aren't powers of 2
|
||||||
static void HWR_DrawFadeMaskInCache(GLMipmap_t *mipmap, INT32 pblockwidth, INT32 pblockheight,
|
static void HWR_DrawFadeMaskInCache(GLMipmap_t *mipmap, INT32 pblockwidth, INT32 pblockheight,
|
||||||
lumpnum_t fademasklumpnum, UINT16 fmwidth, UINT16 fmheight)
|
lumpnum_t fademasklumpnum, UINT16 fmwidth, UINT16 fmheight)
|
||||||
|
|
|
@ -113,9 +113,6 @@ GLPatch_t *HWR_GetPic(lumpnum_t lumpnum);
|
||||||
void HWR_SetPalette(RGBA_t *palette);
|
void HWR_SetPalette(RGBA_t *palette);
|
||||||
GLPatch_t *HWR_GetCachedGLPatchPwad(UINT16 wad, UINT16 lump);
|
GLPatch_t *HWR_GetCachedGLPatchPwad(UINT16 wad, UINT16 lump);
|
||||||
GLPatch_t *HWR_GetCachedGLPatch(lumpnum_t lumpnum);
|
GLPatch_t *HWR_GetCachedGLPatch(lumpnum_t lumpnum);
|
||||||
#ifdef ROTSPRITE
|
|
||||||
GLPatch_t *HWR_GetCachedGLRotSprite(aatree_t *hwrcache, UINT16 rollangle, patch_t *rawpatch);
|
|
||||||
#endif
|
|
||||||
void HWR_GetFadeMask(lumpnum_t fademasklumpnum);
|
void HWR_GetFadeMask(lumpnum_t fademasklumpnum);
|
||||||
|
|
||||||
// --------
|
// --------
|
||||||
|
|
|
@ -729,9 +729,6 @@ typedef struct
|
||||||
{
|
{
|
||||||
patch_t *patch[8][ROTANGLES];
|
patch_t *patch[8][ROTANGLES];
|
||||||
boolean cached[8];
|
boolean cached[8];
|
||||||
#ifdef HWRENDER
|
|
||||||
aatree_t *hardware_patch[8];
|
|
||||||
#endif/*HWRENDER*/
|
|
||||||
} rotsprite_t;
|
} rotsprite_t;
|
||||||
#endif/*ROTSPRITE*/
|
#endif/*ROTSPRITE*/
|
||||||
|
|
||||||
|
|
|
@ -1613,9 +1613,11 @@ void R_CacheRotSprite(spritenum_t sprnum, UINT8 frame, spriteinfo_t *sprinfo, sp
|
||||||
#ifdef HWRENDER
|
#ifdef HWRENDER
|
||||||
if (rendermode == render_opengl)
|
if (rendermode == render_opengl)
|
||||||
{
|
{
|
||||||
GLPatch_t *grPatch = HWR_GetCachedGLRotSprite(sprframe->rotsprite.hardware_patch[rot], angle, newpatch);
|
GLPatch_t *grPatch = Z_Calloc(sizeof(GLPatch_t), PU_HWRPATCHINFO, NULL);
|
||||||
HWR_MakePatch(newpatch, grPatch, grPatch->mipmap, false);
|
grPatch->mipmap = Z_Calloc(sizeof(GLMipmap_t), PU_HWRPATCHINFO, NULL);
|
||||||
|
grPatch->rawpatch = newpatch;
|
||||||
sprframe->rotsprite.patch[rot][angle] = (patch_t *)grPatch;
|
sprframe->rotsprite.patch[rot][angle] = (patch_t *)grPatch;
|
||||||
|
HWR_MakePatch(newpatch, grPatch, grPatch->mipmap, false);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif // HWRENDER
|
#endif // HWRENDER
|
||||||
|
|
|
@ -125,9 +125,6 @@ static void R_InstallSpriteLump(UINT16 wad, // graphics patch
|
||||||
sprtemp[frame].rotsprite.cached[r] = false;
|
sprtemp[frame].rotsprite.cached[r] = false;
|
||||||
for (ang = 0; ang < ROTANGLES; ang++)
|
for (ang = 0; ang < ROTANGLES; ang++)
|
||||||
sprtemp[frame].rotsprite.patch[r][ang] = NULL;
|
sprtemp[frame].rotsprite.patch[r][ang] = NULL;
|
||||||
#ifdef HWRENDER
|
|
||||||
sprtemp[frame].rotsprite.hardware_patch[r] = M_AATreeAlloc(AATREE_ZUSER);
|
|
||||||
#endif/*HWRENDER*/
|
|
||||||
}
|
}
|
||||||
#endif/*ROTSPRITE*/
|
#endif/*ROTSPRITE*/
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue