mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-24 04:51:19 +00:00
Quiet some narrowing conversion warnings from VS2015
This commit is contained in:
parent
0892650465
commit
09a17c2198
9 changed files with 18 additions and 18 deletions
|
@ -225,7 +225,7 @@ public:
|
|||
|
||||
void SetSelection(int Selection)
|
||||
{
|
||||
float f = fabs(SELECTED_JOYSTICK->GetAxisScale(mAxis));
|
||||
float f = fabsf(SELECTED_JOYSTICK->GetAxisScale(mAxis));
|
||||
if (Selection) f*=-1;
|
||||
SELECTED_JOYSTICK->SetAxisScale(mAxis, f);
|
||||
}
|
||||
|
|
|
@ -2305,7 +2305,7 @@ void P_PlayerThink (player_t *player)
|
|||
{
|
||||
// A negative scale is used to prevent G_AddViewAngle/G_AddViewPitch
|
||||
// from scaling with the FOV scale.
|
||||
desired *= fabs(player->ReadyWeapon->FOVScale);
|
||||
desired *= fabsf(player->ReadyWeapon->FOVScale);
|
||||
}
|
||||
if (player->FOV != desired)
|
||||
{
|
||||
|
|
|
@ -2311,9 +2311,9 @@ void FMODSoundRenderer::UpdateListener(SoundListener *listener)
|
|||
pos.z = listener->position.Z;
|
||||
|
||||
float angle = listener->angle;
|
||||
forward.x = cos(angle);
|
||||
forward.x = cosf(angle);
|
||||
forward.y = 0;
|
||||
forward.z = sin(angle);
|
||||
forward.z = sinf(angle);
|
||||
|
||||
up.x = 0;
|
||||
up.y = 1;
|
||||
|
|
|
@ -175,7 +175,7 @@ int WinMIDIDevice::GetTechnology() const
|
|||
|
||||
int WinMIDIDevice::SetTempo(int tempo)
|
||||
{
|
||||
MIDIPROPTEMPO data = { sizeof(MIDIPROPTEMPO), tempo };
|
||||
MIDIPROPTEMPO data = { sizeof(MIDIPROPTEMPO), (DWORD)tempo };
|
||||
return midiStreamProperty(MidiOut, (LPBYTE)&data, MIDIPROP_SET | MIDIPROP_TEMPO);
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ int WinMIDIDevice::SetTempo(int tempo)
|
|||
|
||||
int WinMIDIDevice::SetTimeDiv(int timediv)
|
||||
{
|
||||
MIDIPROPTIMEDIV data = { sizeof(MIDIPROPTIMEDIV), timediv };
|
||||
MIDIPROPTIMEDIV data = { sizeof(MIDIPROPTIMEDIV), (DWORD)timediv };
|
||||
return midiStreamProperty(MidiOut, (LPBYTE)&data, MIDIPROP_SET | MIDIPROP_TIMEDIV);
|
||||
}
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
* T is the enum type of individual flags,
|
||||
* TT is the underlying integer type used (defaults to DWORD)
|
||||
*/
|
||||
template<typename T, typename TT = DWORD>
|
||||
template<typename T, typename TT = uint32>
|
||||
class TFlags
|
||||
{
|
||||
struct ZeroDummy {};
|
||||
|
|
|
@ -190,7 +190,7 @@ void SF2Envelope::Release(Voice *v)
|
|||
if (stage == SF2_ATTACK)
|
||||
{
|
||||
// The attack stage does not use an attenuation in cB like all the rest.
|
||||
volume = log10(volume) * -200;
|
||||
volume = float(log10(volume) * -200);
|
||||
}
|
||||
stage = SF2_RELEASE;
|
||||
bUpdating = true;
|
||||
|
|
|
@ -94,7 +94,7 @@ void Renderer::recompute_freq(int v)
|
|||
if (ch->pitchfactor == 0)
|
||||
{
|
||||
/* Damn. Somebody bent the pitch. */
|
||||
ch->pitchfactor = pow(2.f, ((abs(pb) * ch->pitchsens) / (8191.f * 1200.f)));
|
||||
ch->pitchfactor = float(pow(2.f, ((abs(pb) * ch->pitchsens) / (8191.f * 1200.f))));
|
||||
}
|
||||
if (pb < 0)
|
||||
{
|
||||
|
|
|
@ -1487,10 +1487,10 @@ void D3DFB::DoOffByOneCheck ()
|
|||
float texbot = 1.f / float(FBHeight);
|
||||
FBVERTEX verts[4] =
|
||||
{
|
||||
{ -0.5f, -0.5f, 0.5f, 1.f, 0, ~0, 0.f, 0.f },
|
||||
{ 255.5f, -0.5f, 0.5f, 1.f, 0, ~0, texright, 0.f },
|
||||
{ 255.5f, 0.5f, 0.5f, 1.f, 0, ~0, texright, texbot },
|
||||
{ -0.5f, 0.5f, 0.5f, 1.f, 0, ~0, 0.f, texbot }
|
||||
{ -0.5f, -0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), 0.f, 0.f },
|
||||
{ 255.5f, -0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), texright, 0.f },
|
||||
{ 255.5f, 0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), texright, texbot },
|
||||
{ -0.5f, 0.5f, 0.5f, 1.f, D3DCOLOR_RGBA(0,0,0,0), D3DCOLOR_RGBA(255,255,255,255), 0.f, texbot }
|
||||
};
|
||||
int i, c;
|
||||
|
||||
|
|
|
@ -1423,11 +1423,11 @@ static HCURSOR CreateBitmapCursor(int xhot, int yhot, HBITMAP and_mask, HBITMAP
|
|||
{
|
||||
ICONINFO iconinfo =
|
||||
{
|
||||
FALSE, // fIcon
|
||||
xhot, // xHotspot
|
||||
yhot, // yHotspot
|
||||
and_mask, // hbmMask
|
||||
color_mask // hbmColor
|
||||
FALSE, // fIcon
|
||||
(DWORD)xhot, // xHotspot
|
||||
(DWORD)yhot, // yHotspot
|
||||
and_mask, // hbmMask
|
||||
color_mask // hbmColor
|
||||
};
|
||||
HCURSOR cursor = CreateIconIndirect(&iconinfo);
|
||||
|
||||
|
|
Loading…
Reference in a new issue