summaryrefslogtreecommitdiffstats
path: root/src/render/Sprite.cpp
diff options
context:
space:
mode:
authoraap <aap@papnet.eu>2019-07-10 17:18:26 +0200
committeraap <aap@papnet.eu>2019-07-10 17:18:26 +0200
commit4a36d64f15f898854bb8a76be86ac9a8c536b291 (patch)
tree2ff1344fb2f1e9859ba15cd56c461d40683359f9 /src/render/Sprite.cpp
parentMerge pull request #128 from erorcun/erorcun (diff)
downloadre3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar
re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.gz
re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.bz2
re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.lz
re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.xz
re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.tar.zst
re3-4a36d64f15f898854bb8a76be86ac9a8c536b291.zip
Diffstat (limited to 'src/render/Sprite.cpp')
-rw-r--r--src/render/Sprite.cpp20
1 files changed, 10 insertions, 10 deletions
diff --git a/src/render/Sprite.cpp b/src/render/Sprite.cpp
index d917117a..24577f41 100644
--- a/src/render/Sprite.cpp
+++ b/src/render/Sprite.cpp
@@ -135,8 +135,8 @@ CSprite::RenderOneXLUSprite(float x, float y, float z, float w, float h, uint8 r
void
CSprite::RenderOneXLUSprite_Rotate_Aspect(float x, float y, float z, float w, float h, uint8 r, uint8 g, uint8 b, int16 intens, float recipz, float rotation, uint8 a)
{
- float c = cos(DEGTORAD(rotation));
- float s = sin(DEGTORAD(rotation));
+ float c = Cos(DEGTORAD(rotation));
+ float s = Sin(DEGTORAD(rotation));
float xs[4];
float ys[4];
@@ -261,8 +261,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(DEGTORAD(rotation));
+ float s = Sin(DEGTORAD(rotation));
float xs[4];
float ys[4];
@@ -313,8 +313,8 @@ void
CSprite::RenderBufferedOneXLUSprite_Rotate_Aspect(float x, float y, float z, float w, float h, uint8 r, uint8 g, uint8 b, int16 intens, float recipz, float rotation, uint8 a)
{
m_bFlushSpriteBufferSwitchZTest = 0;
- float c = cos(DEGTORAD(rotation));
- float s = sin(DEGTORAD(rotation));
+ float c = Cos(DEGTORAD(rotation));
+ float s = Sin(DEGTORAD(rotation));
float xs[4];
float ys[4];
@@ -365,8 +365,8 @@ void
CSprite::RenderBufferedOneXLUSprite_Rotate_2Colours(float x, float y, float z, float w, float h, uint8 r1, uint8 g1, uint8 b1, uint8 r2, uint8 g2, uint8 b2, float cx, float cy, float recipz, float rotation, uint8 a)
{
m_bFlushSpriteBufferSwitchZTest = 0;
- float c = cos(DEGTORAD(rotation));
- float s = sin(DEGTORAD(rotation));
+ float c = Cos(DEGTORAD(rotation));
+ float s = Sin(DEGTORAD(rotation));
float xs[4];
float ys[4];
@@ -572,8 +572,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(DEGTORAD(rotation));
+ float s = Sin(DEGTORAD(rotation));
Set6Vertices2D(&SpriteBufferVerts[6 * nSpriteBufferIndex],
x + c*w - s*h,