summaryrefslogtreecommitdiffstatshomepage
path: root/src/emu/rendlay.c
diff options
context:
space:
mode:
author Aaron Giles <aaron@aarongiles.com>2008-01-24 14:24:59 +0000
committer Aaron Giles <aaron@aarongiles.com>2008-01-24 14:24:59 +0000
commit444d77b838efcc392726d0db7651884140c20fff (patch)
tree423868c95aacacbe1bb11e0a984846fb9f0175c6 /src/emu/rendlay.c
parentf446536f183701367b61fcb608e29bffd42d0584 (diff)
From: Atari Ace [mailto:atari_ace@verizon.net]
Subject: [patch] Fix C4305 warnings, other MSVC tweaks Hi mamedev, This patch is a bit of a potpourri. It is the result of enabling most of the suppressed warnings when using MSVC compilers and seeing what issues arose with different compilers (I used 70,71,80,90). Two of the warnings were judged to be useful to enable and methodically fix. Some issues spotted by the other warnings were also fixed. 1. Fixed issues flagged by MSVC warning C4305 (type truncation). Almost all of these are harmless double->float narrowing in initializers, but one warning spotlighted a bug in segasyse.c, where code to use a higher sprite number had no effect due to the insufficient range of UINT8. 2. Removed /wd4550 for VS7/VS71 compilers (expression evaluates to a function which is missing an argument list). There are no cases of this warning currently, and if there were they would most certainly be bugs. This also allowed the warning suppression lists to be remerged for VS7 and VS2005. 3. Decoupled intrinsic support decisions from PTR64 in eivc.h. 4. Fixed some VS7-specific issues (OPTIMIZE=0 at least compiles now). That compiler doesn't support "long long" or "ll" (rsp.c/dkong.c). 5. Added a missing case statement in sm8500d.c. Noticed while reviewing dead code warnings. 6. Replaced a number of static constants with an enum in sidenvel.h. This is unrelated to the rest of this patch, but it was overdue to be done.
Diffstat (limited to 'src/emu/rendlay.c')
-rw-r--r--src/emu/rendlay.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/emu/rendlay.c b/src/emu/rendlay.c
index ab2ac02f581..49e10daae38 100644
--- a/src/emu/rendlay.c
+++ b/src/emu/rendlay.c
@@ -1929,18 +1929,18 @@ static int load_bounds(xml_data_node *boundsnode, render_bounds *bounds)
if (xml_get_attribute(boundsnode, "left") != NULL)
{
/* left/right/top/bottom format */
- bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "left", 0.0);
- bounds->x1 = xml_get_attribute_float_with_subst(boundsnode, "right", 1.0);
- bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "top", 0.0);
- bounds->y1 = xml_get_attribute_float_with_subst(boundsnode, "bottom", 1.0);
+ bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "left", 0.0f);
+ bounds->x1 = xml_get_attribute_float_with_subst(boundsnode, "right", 1.0f);
+ bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "top", 0.0f);
+ bounds->y1 = xml_get_attribute_float_with_subst(boundsnode, "bottom", 1.0f);
}
else if (xml_get_attribute(boundsnode, "x") != NULL)
{
/* x/y/width/height format */
- bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "x", 0.0);
- bounds->x1 = bounds->x0 + xml_get_attribute_float_with_subst(boundsnode, "width", 1.0);
- bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "y", 0.0);
- bounds->y1 = bounds->y0 + xml_get_attribute_float_with_subst(boundsnode, "height", 1.0);
+ bounds->x0 = xml_get_attribute_float_with_subst(boundsnode, "x", 0.0f);
+ bounds->x1 = bounds->x0 + xml_get_attribute_float_with_subst(boundsnode, "width", 1.0f);
+ bounds->y0 = xml_get_attribute_float_with_subst(boundsnode, "y", 0.0f);
+ bounds->y1 = bounds->y0 + xml_get_attribute_float_with_subst(boundsnode, "height", 1.0f);
}
else
{