summaryrefslogtreecommitdiff
path: root/src/simulation/elements
diff options
context:
space:
mode:
authorBryan Hoyle <starfoxprime@gmail.com>2012-11-16 21:51:55 (GMT)
committer Bryan Hoyle <starfoxprime@gmail.com>2012-11-16 21:51:55 (GMT)
commit874cd400093c38e67fde4a1861603bce83135539 (patch)
treee9c8b31b7cc752133dd0e110c652ed9775e859d5 /src/simulation/elements
parente0aa92b017a8d5602ce8b43f6e240ab42a25fac4 (diff)
parentd8be547c734cfaa3d121412b11381b4787380762 (diff)
downloadpowder-874cd400093c38e67fde4a1861603bce83135539.zip
powder-874cd400093c38e67fde4a1861603bce83135539.tar.gz
Merge branch 'master' of github.com:FacialTurd/PowderToypp
Diffstat (limited to 'src/simulation/elements')
-rw-r--r--src/simulation/elements/FWRK.cpp2
-rw-r--r--src/simulation/elements/PLNT.cpp2
-rw-r--r--src/simulation/elements/WOOD.cpp2
3 files changed, 3 insertions, 3 deletions
diff --git a/src/simulation/elements/FWRK.cpp b/src/simulation/elements/FWRK.cpp
index 6889f91..f05db69 100644
--- a/src/simulation/elements/FWRK.cpp
+++ b/src/simulation/elements/FWRK.cpp
@@ -61,7 +61,7 @@ int Element_FWRK::update(UPDATE_FUNC_ARGS)
gx += sinf(angle)*sim->elements[PT_FWRK].Gravity*0.5f;
gy += cosf(angle)*sim->elements[PT_FWRK].Gravity*0.5f;
}
- gmax = fmaxf(fabsf(gx), fabsf(gy));
+ gmax = std::max(fabsf(gx), fabsf(gy));
if (sim->eval_move(PT_FWRK, (int)(x-(gx/gmax)+0.5f), (int)(y-(gy/gmax)+0.5f), NULL))
{
multiplier = 15.0f/sqrtf(gx*gx+gy*gy);
diff --git a/src/simulation/elements/PLNT.cpp b/src/simulation/elements/PLNT.cpp
index 84a83c2..e7439d1 100644
--- a/src/simulation/elements/PLNT.cpp
+++ b/src/simulation/elements/PLNT.cpp
@@ -107,7 +107,7 @@ int Element_PLNT::update(UPDATE_FUNC_ARGS)
//#TPT-Directive ElementHeader Element_PLNT static int graphics(GRAPHICS_FUNC_ARGS)
int Element_PLNT::graphics(GRAPHICS_FUNC_ARGS)
{
- float maxtemp = fmax(cpart->tmp2, cpart->temp);
+ float maxtemp = std::max((float)cpart->tmp2, cpart->temp);
if (maxtemp > 300)
{
*colr += (int)restrict_flt((maxtemp-300)/5,0,58);
diff --git a/src/simulation/elements/WOOD.cpp b/src/simulation/elements/WOOD.cpp
index cbbab8f..134d827 100644
--- a/src/simulation/elements/WOOD.cpp
+++ b/src/simulation/elements/WOOD.cpp
@@ -49,7 +49,7 @@ Element_WOOD::Element_WOOD()
//#TPT-Directive ElementHeader Element_WOOD static int graphics(GRAPHICS_FUNC_ARGS)
int Element_WOOD::graphics(GRAPHICS_FUNC_ARGS)
{
- float maxtemp = fmax(cpart->tmp, cpart->temp);
+ float maxtemp = std::max((float)cpart->tmp, cpart->temp);
if (maxtemp > 400)
{
*colr -= (int)restrict_flt((maxtemp-400)/3,0,172);