diff options
Diffstat (limited to 'src/renderer/Sprite.cpp')
-rw-r--r-- | src/renderer/Sprite.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/renderer/Sprite.cpp b/src/renderer/Sprite.cpp index 3fef0733..ecfd3fdc 100644 --- a/src/renderer/Sprite.cpp +++ b/src/renderer/Sprite.cpp @@ -156,10 +156,10 @@ CSprite::RenderOneXLUSprite_Rotate_Aspect(float x, float y, float z, float w, fl // Fade out when too near // why not in buffered version? - if(z < 3.0f){ - if(z < 1.5f) + if(z < 2.3f){ + if(z < 1.3f) return; - int f = (z - 1.5f)/1.5f * 255; + int f = (z - 1.3f)/(2.3f-1.3f) * 255; r = f*r >> 8; g = f*g >> 8; b = f*b >> 8; @@ -271,8 +271,8 @@ CSprite::RenderBufferedOneXLUSprite_Rotate_Dimension(float x, float y, float z, { m_bFlushSpriteBufferSwitchZTest = 0; // TODO: replace with lookup - float c = Cos(DEGTORAD(rotation)); - float s = Sin(DEGTORAD(rotation)); + float c = Cos(rotation); + float s = Sin(rotation); float xs[4]; float ys[4]; @@ -584,8 +584,8 @@ CSprite::RenderBufferedOneXLUSprite2D_Rotate_Dimension(float x, float y, float w { m_bFlushSpriteBufferSwitchZTest = 1; CRGBA col(intens * colour.red >> 8, intens * colour.green >> 8, intens * colour.blue >> 8, alpha); - float c = Cos(DEGTORAD(rotation)); - float s = Sin(DEGTORAD(rotation)); + float c = Cos(rotation); + float s = Sin(rotation); Set6Vertices2D(&SpriteBufferVerts[6 * nSpriteBufferIndex], x + c*w - s*h, |