1
0
Fork 0
mirror of https://github.com/AquariaOSE/Aquaria.git synced 2025-07-03 06:24:32 +00:00

Re-enable double->float cast warning and fix all instances where this fired

This commit is contained in:
fgenesis 2017-01-19 23:31:56 +01:00
parent 0e6dccbb4e
commit 7a60f493a5
50 changed files with 680 additions and 682 deletions

View file

@ -485,7 +485,7 @@ void RippleEffect::update(float dt, Vector ** drawGrid, int xDivs, int yDivs)
time += dt*0.5f;
float amp = 0.002;
float amp = 0.002f;
for (int i = 0; i < (xDivs-1); i++)
{
for (int j = 0; j < (yDivs-1); j++)

View file

@ -37,9 +37,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#define compile_assert(pred) switch(0){case 0:case (pred):;}
#ifdef _MSC_VER
#pragma warning(disable:4786)
//#pragma warning(disable:4786)
//#pragma warning(disable:4005)
#pragma warning(disable:4305)
//#pragma warning(disable:4305)
//#pragma warning(disable:4018) // signed/unsigned mismatch
#pragma warning(disable:4244) // conversion from types with possible loss of data
@ -88,10 +88,8 @@ enum Direction
DIR_MAX = 8
};
const float SQRT2 = 1.41421356;
const float PI = 3.14159265;
const float PI_HALF = 1.57079633;
const float PI = 3.14159265f;
const float PI_HALF = 1.57079633f;
#ifndef HUGE_VALF
#define HUGE_VALF ((float)1e38)

View file

@ -208,8 +208,8 @@ void DebugButton::onUpdate(float dt)
if (highlight->isCoordinateInsideWorld(core->mouse.position) && ((!md) || (md && !core->mouse.buttons.left)))
{
highlight->color.interpolateTo(activeColor, 0.1);
highlight->alpha.interpolateTo(activeAlpha, 0.1);
highlight->color.interpolateTo(activeColor, 0.1f);
highlight->alpha.interpolateTo(activeAlpha, 0.1f);
if (core->mouse.buttons.left && !md)
md = true;
@ -232,8 +232,8 @@ void DebugButton::onUpdate(float dt)
{
md = false;
}
highlight->color.interpolateTo(inactiveColor, 0.1);
highlight->alpha.interpolateTo(inactiveAlpha, 0.1);
highlight->color.interpolateTo(inactiveColor, 0.1f);
highlight->alpha.interpolateTo(inactiveAlpha, 0.1f);
}

View file

@ -29,7 +29,7 @@ PostProcessingFX::PostProcessingFX()
{
blendType = 0;
layer = renderLayer = 0;
intensity = 0.1;
intensity = 0.1f;
blurTimes = 12;
radialBlurColor = Vector(1,1,1);
for (int i = 0; i < FXT_MAX; i++)
@ -120,7 +120,7 @@ void PostProcessingFX::render()
float percentX = pw, percentY = ph;
float inc = 0.01;
float inc = 0.01f;
float spost = 0.0f; // Starting Texture Coordinate Offset
float alphadec = alpha / blurTimes;

View file

@ -40,8 +40,8 @@ Joystick::Joystick()
# endif
sdl_joy = NULL;
buttonBitmask = 0;
deadZone1 = 0.3;
deadZone2 = 0.3;
deadZone1 = 0.3f;
deadZone2 = 0.3f;
clearRumbleTime= 0;
numJoyAxes = 0;

View file

@ -435,7 +435,7 @@ void ParticleEffect::onUpdate(float dt)
// stop the particle effect, let the particles all die off before we delete ourselves
void ParticleEffect::killParticleEffect()
{
effectLifeCounter = 0.0001;
effectLifeCounter = 0.0001f;
die = true;
//stop();
}

View file

@ -60,7 +60,7 @@ void OutlineRect::onRender()
if (renderCenter)
{
glColor3f(0.9, 0.9, 1);
glColor3f(0.9f, 0.9f, 1);
glBegin(GL_LINES);
// lr
glVertex2f(-w2,0);

View file

@ -175,21 +175,21 @@ void RoundedRect::show()
{
if (alpha.x == 0)
{
const float t = 0.1;
const float t = 0.1f;
alpha = 0;
alpha.interpolateTo(1, t);
scale = Vector(0.5, 0.5);
scale = Vector(0.5f, 0.5f);
scale.interpolateTo(Vector(1,1), t);
}
}
void RoundedRect::hide()
{
const float t = 0.1;
const float t = 0.1f;
alpha = 1.0;
alpha.interpolateTo(0, t);
scale = Vector(1, 1);
scale.interpolateTo(Vector(0.5,0.5), t);
scale.interpolateTo(Vector(0.5f,0.5f), t);
}

View file

@ -232,7 +232,7 @@ void Bone::updateSegment(Bone *b, const Vector &diff)
}
b->rotation.interpolateTo(Vector(0,0,angle),0.2);
b->rotation.interpolateTo(Vector(0,0,angle),0.2f);
}
}

View file

@ -366,11 +366,11 @@ SoundManager::SoundManager(const std::string &defaultDevice)
if (dspReverb)
{
dspReverb->setParameter(FMOD_DSP_REVERB_ROOMSIZE, 0.8);
dspReverb->setParameter(FMOD_DSP_REVERB_DAMP, 0.7);
dspReverb->setParameter(FMOD_DSP_REVERB_WETMIX, 0.11);
dspReverb->setParameter(FMOD_DSP_REVERB_DRYMIX, 0.88);
dspReverb->setParameter(FMOD_DSP_REVERB_WIDTH, 1.0);
dspReverb->setParameter(FMOD_DSP_REVERB_ROOMSIZE, 0.8f);
dspReverb->setParameter(FMOD_DSP_REVERB_DAMP, 0.7f);
dspReverb->setParameter(FMOD_DSP_REVERB_WETMIX, 0.11f);
dspReverb->setParameter(FMOD_DSP_REVERB_DRYMIX, 0.88f);
dspReverb->setParameter(FMOD_DSP_REVERB_WIDTH, 1.0f);
dspReverb->setParameter(FMOD_DSP_REVERB_MODE, 0); // 0 or 1
}