- removed the last remaining uses of the finesine table from the rendering code.

This commit is contained in:
Christoph Oelckers 2016-04-28 11:37:02 +02:00
parent ae7d048057
commit 8171637a57
2 changed files with 11 additions and 11 deletions

View file

@ -678,7 +678,7 @@ void R_DrawVisVoxel(vissprite_t *spr, int minslabz, int maxslabz, short *cliptop
} }
// Render the voxel, either directly to the screen or offscreen. // Render the voxel, either directly to the screen or offscreen.
R_DrawVoxel(spr->pa.vpos, spr->pa.vang, spr->gpos, spr->angle, R_DrawVoxel(spr->pa.vpos, spr->pa.vang, spr->gpos, spr->Angle,
spr->xscale, FLOAT2FIXED(spr->yscale), spr->voxel, spr->Style.colormap, cliptop, clipbot, spr->xscale, FLOAT2FIXED(spr->yscale), spr->voxel, spr->Style.colormap, cliptop, clipbot,
minslabz, maxslabz, flags); minslabz, maxslabz, flags);
@ -994,7 +994,7 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
vis->texturemid = tex->TopOffset - (ViewPos.Z - pos.Z + thing->Floorclip) / yscale; vis->texturemid = tex->TopOffset - (ViewPos.Z - pos.Z + thing->Floorclip) / yscale;
vis->x1 = x1 < WindowLeft ? WindowLeft : x1; vis->x1 = x1 < WindowLeft ? WindowLeft : x1;
vis->x2 = x2 > WindowRight ? WindowRight : x2; vis->x2 = x2 > WindowRight ? WindowRight : x2;
vis->angle = thing->Angles.Yaw.BAMs(); vis->Angle = thing->Angles.Yaw;
if (renderflags & RF_XFLIP) if (renderflags & RF_XFLIP)
{ {
@ -1024,13 +1024,13 @@ void R_ProjectSprite (AActor *thing, int fakeside, F3DFloor *fakefloor, F3DFloor
pos.Z -= thing->Floorclip; pos.Z -= thing->Floorclip;
vis->angle = thing->Angles.Yaw.BAMs() + voxel->AngleOffset.BAMs(); vis->Angle = thing->Angles.Yaw + voxel->AngleOffset;
int voxelspin = (thing->flags & MF_DROPPED) ? voxel->DroppedSpin : voxel->PlacedSpin; int voxelspin = (thing->flags & MF_DROPPED) ? voxel->DroppedSpin : voxel->PlacedSpin;
if (voxelspin != 0) if (voxelspin != 0)
{ {
DAngle ang = double(I_FPSTime()) * voxelspin / 1000; DAngle ang = double(I_FPSTime()) * voxelspin / 1000;
vis->angle -= ang.BAMs(); vis->Angle -= ang;
} }
vis->pa.vpos = { (float)ViewPos.X, (float)ViewPos.Y, (float)ViewPos.Z }; vis->pa.vpos = { (float)ViewPos.X, (float)ViewPos.Y, (float)ViewPos.Z };
@ -2664,7 +2664,7 @@ void R_DrawParticle (vissprite_t *vis)
extern double BaseYaspectMul;; extern double BaseYaspectMul;;
void R_DrawVoxel(const FVector3 &globalpos, FAngle viewangle, void R_DrawVoxel(const FVector3 &globalpos, FAngle viewangle,
const FVector3 &dasprpos, angle_t dasprang, const FVector3 &dasprpos, DAngle dasprang,
fixed_t daxscale, fixed_t dayscale, FVoxel *voxobj, fixed_t daxscale, fixed_t dayscale, FVoxel *voxobj,
lighttable_t *colormap, short *daumost, short *dadmost, int minslabz, int maxslabz, int flags) lighttable_t *colormap, short *daumost, short *dadmost, int minslabz, int maxslabz, int flags)
{ {
@ -2698,10 +2698,10 @@ void R_DrawVoxel(const FVector3 &globalpos, FAngle viewangle,
dayscale = dayscale / (0xC000 >> 6); dayscale = dayscale / (0xC000 >> 6);
angle_t viewang = viewangle.BAMs(); angle_t viewang = viewangle.BAMs();
cosang = finecosine[viewang >> ANGLETOFINESHIFT] >> 2; cosang = FLOAT2FIXED(viewangle.Cos()) >> 2;
sinang = -finesine[viewang >> ANGLETOFINESHIFT] >> 2; sinang = FLOAT2FIXED(-viewangle.Sin()) >> 2;
sprcosang = finecosine[dasprang >> ANGLETOFINESHIFT] >> 2; sprcosang = FLOAT2FIXED(dasprang.Cos()) >> 2;
sprsinang = -finesine[dasprang >> ANGLETOFINESHIFT] >> 2; sprsinang = FLOAT2FIXED(-dasprang.Sin()) >> 2;
R_SetupDrawSlab(colormap); R_SetupDrawSlab(colormap);

View file

@ -50,7 +50,7 @@ struct vissprite_t
int y1, y2; // top / bottom of particle on screen int y1, y2; // top / bottom of particle on screen
}; };
}; };
angle_t angle; DAngle Angle;
fixed_t xscale; fixed_t xscale;
float yscale; float yscale;
float depth; float depth;
@ -141,7 +141,7 @@ void R_CheckOffscreenBuffer(int width, int height, bool spansonly);
enum { DVF_OFFSCREEN = 1, DVF_SPANSONLY = 2, DVF_MIRRORED = 4 }; enum { DVF_OFFSCREEN = 1, DVF_SPANSONLY = 2, DVF_MIRRORED = 4 };
void R_DrawVoxel(const FVector3 &viewpos, FAngle viewangle, void R_DrawVoxel(const FVector3 &viewpos, FAngle viewangle,
const FVector3 &sprpos, angle_t dasprang, const FVector3 &sprpos, DAngle dasprang,
fixed_t daxscale, fixed_t dayscale, struct FVoxel *voxobj, fixed_t daxscale, fixed_t dayscale, struct FVoxel *voxobj,
lighttable_t *colormap, short *daumost, short *dadmost, int minslabz, int maxslabz, int flags); lighttable_t *colormap, short *daumost, short *dadmost, int minslabz, int maxslabz, int flags);