mirror of
https://github.com/ZDoom/qzdoom.git
synced 2025-02-08 16:52:01 +00:00
- fixed several scale related floating point conversion warnings.
This commit is contained in:
parent
431c47c957
commit
355219d614
7 changed files with 12 additions and 12 deletions
|
@ -373,7 +373,7 @@ struct FMapThing
|
|||
double Gravity;
|
||||
double Alpha;
|
||||
uint32_t fillcolor;
|
||||
DVector2 Scale;
|
||||
FVector2 Scale;
|
||||
double Health;
|
||||
int score;
|
||||
int16_t pitch;
|
||||
|
|
|
@ -1193,7 +1193,7 @@ static int PatchThing (int thingy)
|
|||
}
|
||||
else if (stricmp (Line1, "Scale") == 0)
|
||||
{
|
||||
info->Scale.Y = info->Scale.X = clamp(atof (Line2), 1./65536, 256.);
|
||||
info->Scale.Y = info->Scale.X = clamp((float)atof (Line2), 1.f/65536, 256.f);
|
||||
}
|
||||
else if (stricmp (Line1, "Decal") == 0)
|
||||
{
|
||||
|
|
|
@ -670,7 +670,7 @@ void DIntermissionScreenCast::Drawer ()
|
|||
// draw the current frame in the middle of the screen
|
||||
if (caststate != NULL)
|
||||
{
|
||||
DVector2 castscale = DVector2(mDefaults->Scale.X, mDefaults->Scale.Y);
|
||||
FVector2 castscale = mDefaults->Scale;
|
||||
|
||||
int castsprite = caststate->sprite;
|
||||
|
||||
|
|
|
@ -737,15 +737,15 @@ public:
|
|||
break;
|
||||
|
||||
case NAME_ScaleX:
|
||||
th->Scale.X = CheckFloat(key);
|
||||
th->Scale.X = (float)CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_ScaleY:
|
||||
th->Scale.Y = CheckFloat(key);
|
||||
th->Scale.Y = (float)CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_Scale:
|
||||
th->Scale.X = th->Scale.Y = CheckFloat(key);
|
||||
th->Scale.X = th->Scale.Y = (float)CheckFloat(key);
|
||||
break;
|
||||
|
||||
case NAME_FriendlySeeBlocks:
|
||||
|
|
|
@ -4245,11 +4245,11 @@ void DLevelScript::DoSetActorProperty (AActor *actor, int property, int value)
|
|||
break;
|
||||
|
||||
case APROP_ScaleX:
|
||||
actor->Scale.X = ACSToDouble(value);
|
||||
actor->Scale.X = (float)ACSToDouble(value);
|
||||
break;
|
||||
|
||||
case APROP_ScaleY:
|
||||
actor->Scale.Y = ACSToDouble(value);
|
||||
actor->Scale.Y = (float)ACSToDouble(value);
|
||||
break;
|
||||
|
||||
case APROP_Mass:
|
||||
|
|
|
@ -651,7 +651,7 @@ void R_InitSkins (void)
|
|||
}
|
||||
else if (0 == stricmp (key, "scale"))
|
||||
{
|
||||
Skins[i].Scale.X = clamp(atof (sc.String), 1./65536, 256.);
|
||||
Skins[i].Scale.X = clamp((float)atof (sc.String), 1.f/65536, 256.f);
|
||||
Skins[i].Scale.Y = Skins[i].Scale.X;
|
||||
}
|
||||
else if (0 == stricmp (key, "game"))
|
||||
|
@ -1000,7 +1000,7 @@ void R_InitSprites ()
|
|||
auto type = GetDefaultByType(PlayerClasses[0].Type);
|
||||
Skins[i].range0start = type->IntVar(NAME_ColorRangeStart);
|
||||
Skins[i].range0end = type->IntVar(NAME_ColorRangeEnd);
|
||||
Skins[i].Scale = DVector2(type->Scale.X, type->Scale.Y);
|
||||
Skins[i].Scale = type->Scale;
|
||||
}
|
||||
|
||||
R_InitSpriteDefs ();
|
||||
|
@ -1019,7 +1019,7 @@ void R_InitSprites ()
|
|||
Skins[i].Face = face == NAME_None? "STF" : face.GetChars();
|
||||
Skins[i].range0start = basetype->IntVar(NAME_ColorRangeStart);
|
||||
Skins[i].range0end = basetype->IntVar(NAME_ColorRangeEnd);
|
||||
Skins[i].Scale = DVector2(basetype->Scale.X, basetype->Scale.Y);
|
||||
Skins[i].Scale = basetype->Scale;
|
||||
Skins[i].sprite = basetype->SpawnState->sprite;
|
||||
Skins[i].namespc = ns_global;
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ public:
|
|||
uint8_t range0start = 0;
|
||||
uint8_t range0end = 0;
|
||||
bool othergame = 0; // [GRB]
|
||||
DVector2 Scale = { 1, 1 };
|
||||
FVector2 Scale = { 1, 1 };
|
||||
int sprite = 0;
|
||||
int crouchsprite = 0;
|
||||
int namespc = 0; // namespace for this skin
|
||||
|
|
Loading…
Reference in a new issue