Fixed up conversion warnings in VS2010.

This commit is contained in:
NathanSweet 2013-04-25 23:39:46 +02:00
parent 90747edd74
commit 99ec8957f8
8 changed files with 14 additions and 14 deletions

View File

@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 11.00
# Visual C++ Express 2010
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "Spine-C", "Spine-C.vcxproj", "{5D74934A-7512-45EE-8402-7B95D3642E85}"
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "spine-c", "spine-c.vcxproj", "{5D74934A-7512-45EE-8402-7B95D3642E85}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution

View File

@ -72,7 +72,7 @@ struct AtlasRegion {
const char* name;
int x, y, width, height;
float u, v, u2, v2;
float offsetX, offsetY;
int offsetX, offsetY;
int originalWidth, originalHeight;
int index;
int/*bool*/rotate;

View File

@ -45,9 +45,9 @@ struct RegionAttachment {
float x, y, scaleX, scaleY, rotation, width, height;
void* texture;
float regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */
float regionWidth, regionHeight; /* Unrotated, stripped size. */
float regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped size. */
int regionOffsetX, regionOffsetY; /* Pixels stripped from the bottom left, unrotated. */
int regionWidth, regionHeight; /* Unrotated, stripped pixel size. */
int regionOriginalWidth, regionOriginalHeight; /* Unrotated, unstripped pixel size. */
float offset[8];
float vertices[8];

View File

@ -54,7 +54,7 @@ void Animation_apply (const Animation* self, Skeleton* skeleton, float time, int
#ifdef __STDC_VERSION__
if (loop && self->duration) time = fmodf(time, self->duration);
#else
if (loop && self->duration) time = fmod(time, self->duration);
if (loop && self->duration) time = (float)fmod(time, self->duration);
#endif
for (i = 0; i < n; ++i)
@ -67,7 +67,7 @@ void Animation_mix (const Animation* self, Skeleton* skeleton, float time, int/*
#ifdef __STDC_VERSION__
if (loop && self->duration) time = fmodf(time, self->duration);
#else
if (loop && self->duration) time = fmod(time, self->duration);
if (loop && self->duration) time = (float)fmod(time, self->duration);
#endif
for (i = 0; i < n; ++i)

View File

@ -272,8 +272,8 @@ Atlas* Atlas_readAtlas (const char* begin, int length, const char* dir) {
region->originalHeight = toInt(tuple + 1);
readTuple(end, tuple);
region->offsetX = (float)toInt(tuple);
region->offsetY = (float)toInt(tuple + 1);
region->offsetX = toInt(tuple);
region->offsetY = toInt(tuple + 1);
if (!readValue(end, &str)) return abortAtlas(self);
region->index = toInt(&str);

View File

@ -77,8 +77,8 @@ void Bone_updateWorldTransform (Bone* self, int flipX, int flipY) {
cosine = cosf(radians);
sine = sinf(radians);
#else
cosine = cos(radians);
sine = sin(radians);
cosine = (float)cos(radians);
sine = (float)sin(radians);
#endif
CONST_CAST(float, self->m00) = cosine * self->worldScaleX;
CONST_CAST(float, self->m10) = sine * self->worldScaleX;

View File

@ -92,7 +92,7 @@ static const char* parse_number (Json *item, const char* num) {
subscale = (subscale * 10) + (*num++ - '0'); /* Number? */
}
n = sign * n * pow(10.0f, (scale + subscale * signsubscale)); /* number = +/- number.fraction * 10^+/- exponent */
n = sign * n * (float)pow(10.0f, (scale + subscale * signsubscale)); /* number = +/- number.fraction * 10^+/- exponent */
item->valuefloat = n;
item->valueint = (int)n;

View File

@ -73,8 +73,8 @@ void RegionAttachment_updateOffset (RegionAttachment* self) {
float cosine = cosf(radians);
float sine = sinf(radians);
#else
float cosine = cos(radians);
float sine = sin(radians);
float cosine = (float)cos(radians);
float sine = (float)sin(radians);
#endif
float localXCos = localX * cosine + self->x;
float localXSin = localX * sine;