- disable implicit conversions from float to TAngle

This commit is contained in:
Christoph Oelckers 2022-08-26 00:56:53 +02:00
commit f0fbdba593
66 changed files with 425 additions and 374 deletions

View file

@ -77,19 +77,19 @@ FTextureID spritedef_t::GetSpriteFrame(int frame, int rot, DAngle ang, bool *mir
{
if ((sprframe->Texture[0] == sprframe->Texture[1]) && flipagain)
{
rot = (360.0 - ang + 45.0 / 2 * 9).BAMs() >> 28;
rot = (- ang + DAngle::fromDeg(360.0 + 45.0 / 2 * 9)).BAMs() >> 28;
}
else if (sprframe->Texture[0] == sprframe->Texture[1])
{
rot = (ang + 45.0 / 2 * 9).BAMs() >> 28;
rot = (ang + DAngle::fromDeg(45.0 / 2 * 9)).BAMs() >> 28;
}
else if (flipagain)
{
rot = (360.0 - ang + (45.0 / 2 * 9 - 180.0 / 16)).BAMs() >> 28;
rot = (- ang + DAngle::fromDeg(360.0 + (45.0 / 2 * 9 - 180.0 / 16))).BAMs() >> 28;
}
else
{
rot = (ang + (45.0 / 2 * 9 - 180.0 / 16)).BAMs() >> 28;
rot = (ang + DAngle::fromDeg(45.0 / 2 * 9 - 180.0 / 16)).BAMs() >> 28;
}
}
if (mirror) *mirror = !!(sprframe->Flip&(1 << rot));

View file

@ -53,7 +53,7 @@
struct VoxelOptions
{
VoxelOptions()
: DroppedSpin(0), PlacedSpin(0), Scale(1.), AngleOffset(90.), OverridePalette(false),
: DroppedSpin(0), PlacedSpin(0), Scale(1.), AngleOffset(DAngle::fromDeg(90.)), OverridePalette(false),
PitchFromMomentum(false), UseActorPitch(false), UseActorRoll(false)
{}
@ -178,7 +178,7 @@ static void VOX_ReadOptions(FScanner &sc, VoxelOptions &opts)
{
sc.TokenMustBe(TK_FloatConst);
}
opts.AngleOffset = mul * sc.Float + 90.;
opts.AngleOffset = DAngle::fromDeg(mul * sc.Float + 90.);
}
else if (sc.Compare("overridepalette"))
{