- removed several unneeded GL headers from the software renderer's sources.
- consolidated the code to calculate a sprite's display angle for all 3 renderers. As it turned out, they all differed in their feature support because they had always been updated independently by different people.
This commit is contained in:
parent
005e6871f9
commit
b529b1e3a7
20 changed files with 100 additions and 103 deletions
|
|
@ -333,42 +333,6 @@ CCMD(gl_resetmap)
|
|||
}
|
||||
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// Gets the texture index for a sprite frame
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
FTextureID gl_GetSpriteFrame(unsigned sprite, int frame, int rot, angle_t ang, bool *mirror)
|
||||
{
|
||||
spritedef_t *sprdef = &sprites[sprite];
|
||||
if (frame >= sprdef->numframes)
|
||||
{
|
||||
// If there are no frames at all for this sprite, don't draw it.
|
||||
return FNullTextureID();
|
||||
}
|
||||
else
|
||||
{
|
||||
//picnum = SpriteFrames[sprdef->spriteframes + thing->frame].Texture[0];
|
||||
// choose a different rotation based on player view
|
||||
spriteframe_t *sprframe = &SpriteFrames[sprdef->spriteframes + frame];
|
||||
if (rot==-1)
|
||||
{
|
||||
if (sprframe->Texture[0] == sprframe->Texture[1])
|
||||
{
|
||||
rot = (ang + (angle_t)(ANGLE_90/4)*9) >> 28;
|
||||
}
|
||||
else
|
||||
{
|
||||
rot = (ang + (angle_t)(ANGLE_90/4)*9-(angle_t)(ANGLE_180/16)) >> 28;
|
||||
}
|
||||
}
|
||||
if (mirror) *mirror = !!(sprframe->Flip&(1<<rot));
|
||||
return sprframe->Texture[rot];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//==========================================================================
|
||||
//
|
||||
// Recalculate all heights affecting this vertex.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue