mirror of
https://github.com/ZDoom/gzdoom.git
synced 2024-11-13 16:07:45 +00:00
- implemented rendering of wall sprites.
This commit is contained in:
parent
398d902e7e
commit
b3e0d93385
2 changed files with 33 additions and 15 deletions
|
@ -711,13 +711,31 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
|
||||||
{
|
{
|
||||||
PerformSpriteClipAdjustment(thing, thingx, thingy, spriteheight);
|
PerformSpriteClipAdjustment(thing, thingx, thingy, spriteheight);
|
||||||
}
|
}
|
||||||
float viewvecX = GLRenderer->mViewVector.X;
|
|
||||||
float viewvecY = GLRenderer->mViewVector.Y;
|
float viewvecX;
|
||||||
|
float viewvecY;
|
||||||
|
switch (thing->renderflags & RF_SPRITETYPEMASK)
|
||||||
|
{
|
||||||
|
case RF_FACESPRITE:
|
||||||
|
viewvecX = GLRenderer->mViewVector.X;
|
||||||
|
viewvecY = GLRenderer->mViewVector.Y;
|
||||||
|
|
||||||
x1 = x - viewvecY*leftfac;
|
x1 = x - viewvecY*leftfac;
|
||||||
x2 = x - viewvecY*rightfac;
|
x2 = x - viewvecY*rightfac;
|
||||||
y1 = y + viewvecX*leftfac;
|
y1 = y + viewvecX*leftfac;
|
||||||
y2 = y + viewvecX*rightfac;
|
y2 = y + viewvecX*rightfac;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case RF_WALLSPRITE:
|
||||||
|
viewvecX = FIXED2FLOAT(finecosine[thing->angle >> ANGLETOFINESHIFT]);
|
||||||
|
viewvecY = FIXED2FLOAT(finesine[thing->angle >> ANGLETOFINESHIFT]);
|
||||||
|
|
||||||
|
x1 = x + viewvecY*leftfac;
|
||||||
|
x2 = x + viewvecY*rightfac;
|
||||||
|
y1 = y - viewvecX*leftfac;
|
||||||
|
y2 = y - viewvecX*rightfac;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -887,6 +905,7 @@ void GLSprite::Process(AActor* thing,sector_t * sector)
|
||||||
particle=NULL;
|
particle=NULL;
|
||||||
|
|
||||||
const bool drawWithXYBillboard = ( !(actor->renderflags & RF_FORCEYBILLBOARD)
|
const bool drawWithXYBillboard = ( !(actor->renderflags & RF_FORCEYBILLBOARD)
|
||||||
|
&& (actor->renderflags & RF_SPRITETYPEMASK) == RF_FACESPRITE
|
||||||
&& players[consoleplayer].camera
|
&& players[consoleplayer].camera
|
||||||
&& (gl_billboard_mode == 1 || actor->renderflags & RF_FORCEXYBILLBOARD ) );
|
&& (gl_billboard_mode == 1 || actor->renderflags & RF_FORCEXYBILLBOARD ) );
|
||||||
|
|
||||||
|
|
|
@ -1858,7 +1858,6 @@ void P_SpawnThings (int position)
|
||||||
{
|
{
|
||||||
SetMapThingUserData(actor, *udi);
|
SetMapThingUserData(actor, *udi);
|
||||||
}
|
}
|
||||||
if (actor != NULL) actor->renderflags |= RF_WALLSPRITE;
|
|
||||||
}
|
}
|
||||||
for(int i=0; i<MAXPLAYERS; i++)
|
for(int i=0; i<MAXPLAYERS; i++)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue