mirror of
https://github.com/ZDoom/qzdoom.git
synced 2024-11-28 06:53:58 +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)
|
void SetSelection(int Selection)
|
||||||
{
|
{
|
||||||
float f = fabs(SELECTED_JOYSTICK->GetAxisScale(mAxis));
|
float f = fabsf(SELECTED_JOYSTICK->GetAxisScale(mAxis));
|
||||||
if (Selection) f*=-1;
|
if (Selection) f*=-1;
|
||||||
SELECTED_JOYSTICK->SetAxisScale(mAxis, f);
|
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
|
// A negative scale is used to prevent G_AddViewAngle/G_AddViewPitch
|
||||||
// from scaling with the FOV scale.
|
// from scaling with the FOV scale.
|
||||||
desired *= fabs(player->ReadyWeapon->FOVScale);
|
desired *= fabsf(player->ReadyWeapon->FOVScale);
|
||||||
}
|
}
|
||||||
if (player->FOV != desired)
|
if (player->FOV != desired)
|
||||||
{
|
{
|
||||||
|
|
|
@ -2311,9 +2311,9 @@ void FMODSoundRenderer::UpdateListener(SoundListener *listener)
|
||||||
pos.z = listener->position.Z;
|
pos.z = listener->position.Z;
|
||||||
|
|
||||||
float angle = listener->angle;
|
float angle = listener->angle;
|
||||||
forward.x = cos(angle);
|
forward.x = cosf(angle);
|
||||||
forward.y = 0;
|
forward.y = 0;
|
||||||
forward.z = sin(angle);
|
forward.z = sinf(angle);
|
||||||
|
|
||||||
up.x = 0;
|
up.x = 0;
|
||||||
up.y = 1;
|
up.y = 1;
|
||||||
|
|
|
@ -175,7 +175,7 @@ int WinMIDIDevice::GetTechnology() const
|
||||||
|
|
||||||
int WinMIDIDevice::SetTempo(int tempo)
|
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);
|
return midiStreamProperty(MidiOut, (LPBYTE)&data, MIDIPROP_SET | MIDIPROP_TEMPO);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -187,7 +187,7 @@ int WinMIDIDevice::SetTempo(int tempo)
|
||||||
|
|
||||||
int WinMIDIDevice::SetTimeDiv(int timediv)
|
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);
|
return midiStreamProperty(MidiOut, (LPBYTE)&data, MIDIPROP_SET | MIDIPROP_TIMEDIV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
* T is the enum type of individual flags,
|
* T is the enum type of individual flags,
|
||||||
* TT is the underlying integer type used (defaults to DWORD)
|
* TT is the underlying integer type used (defaults to DWORD)
|
||||||
*/
|
*/
|
||||||
template<typename T, typename TT = DWORD>
|
template<typename T, typename TT = uint32>
|
||||||
class TFlags
|
class TFlags
|
||||||
{
|
{
|
||||||
struct ZeroDummy {};
|
struct ZeroDummy {};
|
||||||
|
|
|
@ -190,7 +190,7 @@ void SF2Envelope::Release(Voice *v)
|
||||||
if (stage == SF2_ATTACK)
|
if (stage == SF2_ATTACK)
|
||||||
{
|
{
|
||||||
// The attack stage does not use an attenuation in cB like all the rest.
|
// 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;
|
stage = SF2_RELEASE;
|
||||||
bUpdating = true;
|
bUpdating = true;
|
||||||
|
|
|
@ -94,7 +94,7 @@ void Renderer::recompute_freq(int v)
|
||||||
if (ch->pitchfactor == 0)
|
if (ch->pitchfactor == 0)
|
||||||
{
|
{
|
||||||
/* Damn. Somebody bent the pitch. */
|
/* 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)
|
if (pb < 0)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1487,10 +1487,10 @@ void D3DFB::DoOffByOneCheck ()
|
||||||
float texbot = 1.f / float(FBHeight);
|
float texbot = 1.f / float(FBHeight);
|
||||||
FBVERTEX verts[4] =
|
FBVERTEX verts[4] =
|
||||||
{
|
{
|
||||||
{ -0.5f, -0.5f, 0.5f, 1.f, 0, ~0, 0.f, 0.f },
|
{ -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, 0, ~0, texright, 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, 0, ~0, texright, texbot },
|
{ 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, 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, texbot }
|
||||||
};
|
};
|
||||||
int i, c;
|
int i, c;
|
||||||
|
|
||||||
|
|
|
@ -1423,11 +1423,11 @@ static HCURSOR CreateBitmapCursor(int xhot, int yhot, HBITMAP and_mask, HBITMAP
|
||||||
{
|
{
|
||||||
ICONINFO iconinfo =
|
ICONINFO iconinfo =
|
||||||
{
|
{
|
||||||
FALSE, // fIcon
|
FALSE, // fIcon
|
||||||
xhot, // xHotspot
|
(DWORD)xhot, // xHotspot
|
||||||
yhot, // yHotspot
|
(DWORD)yhot, // yHotspot
|
||||||
and_mask, // hbmMask
|
and_mask, // hbmMask
|
||||||
color_mask // hbmColor
|
color_mask // hbmColor
|
||||||
};
|
};
|
||||||
HCURSOR cursor = CreateIconIndirect(&iconinfo);
|
HCURSOR cursor = CreateIconIndirect(&iconinfo);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue