summaryrefslogtreecommitdiffstats
path: root/src/render/Sprite.cpp
diff options
context:
space:
mode:
authorFire_Head <Fire-Head@users.noreply.github.com>2019-07-11 02:48:36 +0200
committerGitHub <noreply@github.com>2019-07-11 02:48:36 +0200
commitaa449b6fe162d8960351c5fe164a9120b8572652 (patch)
treefa82496d356ac2b77ffa1ab00684b0150907f009 /src/render/Sprite.cpp
parentfixfixfix (diff)
parentMerge pull request #129 from erorcun/erorcun (diff)
downloadre3-aa449b6fe162d8960351c5fe164a9120b8572652.tar
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.gz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.bz2
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.lz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.xz
re3-aa449b6fe162d8960351c5fe164a9120b8572652.tar.zst
re3-aa449b6fe162d8960351c5fe164a9120b8572652.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,