diff --git a/src/menu/joystickmenu.cpp b/src/menu/joystickmenu.cpp index 676bc1767..90c2b0c4e 100644 --- a/src/menu/joystickmenu.cpp +++ b/src/menu/joystickmenu.cpp @@ -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); } diff --git a/src/p_user.cpp b/src/p_user.cpp index 9f5a37293..0427bd64f 100644 --- a/src/p_user.cpp +++ b/src/p_user.cpp @@ -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) { diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index e7a617f5a..1b9dcfda9 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -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; diff --git a/src/sound/music_win_mididevice.cpp b/src/sound/music_win_mididevice.cpp index 151728662..38fa18c59 100644 --- a/src/sound/music_win_mididevice.cpp +++ b/src/sound/music_win_mididevice.cpp @@ -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); } diff --git a/src/tflags.h b/src/tflags.h index 48866c828..81e54e3bb 100644 --- a/src/tflags.h +++ b/src/tflags.h @@ -42,7 +42,7 @@ * T is the enum type of individual flags, * TT is the underlying integer type used (defaults to DWORD) */ -template +template class TFlags { struct ZeroDummy {}; diff --git a/src/timidity/mix.cpp b/src/timidity/mix.cpp index beda91e16..05a3eddd4 100644 --- a/src/timidity/mix.cpp +++ b/src/timidity/mix.cpp @@ -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; diff --git a/src/timidity/playmidi.cpp b/src/timidity/playmidi.cpp index 7d8294384..8acdd3487 100644 --- a/src/timidity/playmidi.cpp +++ b/src/timidity/playmidi.cpp @@ -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) { diff --git a/src/win32/fb_d3d9.cpp b/src/win32/fb_d3d9.cpp index 4e3a14c18..d0ed84442 100644 --- a/src/win32/fb_d3d9.cpp +++ b/src/win32/fb_d3d9.cpp @@ -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; diff --git a/src/win32/i_system.cpp b/src/win32/i_system.cpp index 133337af5..a5c2eb84e 100644 --- a/src/win32/i_system.cpp +++ b/src/win32/i_system.cpp @@ -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);