From 45e4919fe95f55c9c751c0827aea1c6d6a7b72e9 Mon Sep 17 00:00:00 2001 From: raven02 Date: Sun, 17 Feb 2013 21:26:23 +0800 Subject: [PATCH] Change .f to .0f etc. --- GPU/GLES/VertexDecoder.cpp | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/GPU/GLES/VertexDecoder.cpp b/GPU/GLES/VertexDecoder.cpp index 6e68bdec4..75614f67e 100644 --- a/GPU/GLES/VertexDecoder.cpp +++ b/GPU/GLES/VertexDecoder.cpp @@ -197,7 +197,7 @@ void VertexDecoder::Step_Color5551() const c[0] = Convert5To8(cdata & 0x1f); c[1] = Convert5To8((cdata>>5) & 0x1f); c[2] = Convert5To8((cdata>>10) & 0x1f); - c[3] = (cdata>>15) ? 255 : 0; + c[3] = (cdata>>15) ? 255.0f : 0.0f; } void VertexDecoder::Step_Color4444() const @@ -222,15 +222,15 @@ void VertexDecoder::Step_Color565Morph() const { float w = gstate_c.morphWeights[n]; u16 cdata = *(u16*)(ptr_ + onesize_*n + coloff); - col[0] += w * (cdata & 0x1f) / 31.f; - col[1] += w * ((cdata>>5) & 0x3f) / 63.f; - col[2] += w * ((cdata>>11) & 0x1f) / 31.f; + col[0] += w * (cdata & 0x1f) / 31.0f; + col[1] += w * ((cdata>>5) & 0x3f) / 63.0f; + col[2] += w * ((cdata>>11) & 0x1f) / 31.0f; } u8 *c = decoded_ + decFmt.c0off; for (int i = 0; i < 3; i++) { c[i] = (u8)(col[i] * 255.0f); } - c[3] = 255; + c[3] = 255.0f; } void VertexDecoder::Step_Color5551Morph() const @@ -240,9 +240,9 @@ void VertexDecoder::Step_Color5551Morph() const { float w = gstate_c.morphWeights[n]; u16 cdata = *(u16*)(ptr_ + onesize_*n + coloff); - col[0] += w * (cdata & 0x1f) / 31.f; - col[1] += w * ((cdata>>5) & 0x1f) / 31.f; - col[2] += w * ((cdata>>10) & 0x1f) / 31.f; + col[0] += w * (cdata & 0x1f) / 31.0f; + col[1] += w * ((cdata>>5) & 0x1f) / 31.0f; + col[2] += w * ((cdata>>10) & 0x1f) / 31.0f; col[3] += w * ((cdata>>15) ? 1.0f : 0.0f); } u8 *c = decoded_ + decFmt.c0off; @@ -259,7 +259,7 @@ void VertexDecoder::Step_Color4444Morph() const float w = gstate_c.morphWeights[n]; u16 cdata = *(u16*)(ptr_ + onesize_*n + coloff); for (int j = 0; j < 4; j++) - col[j] += w * ((cdata >> (j * 4)) & 0xF) / 15.f; + col[j] += w * ((cdata >> (j * 4)) & 0xF) / 15.0f; } u8 *c = decoded_ + decFmt.c0off; for (int i = 0; i < 4; i++) { @@ -346,7 +346,7 @@ void VertexDecoder::Step_NormalS16Morph() const multiplier = -multiplier; } const s16 *sv = (const s16 *)(ptr_ + onesize_*n + nrmoff); - multiplier *= (1.0f/32767.f); + multiplier *= (1.0f/32767.0f); for (int j = 0; j < 3; j++) normal[j] += sv[j] * multiplier; }