diff options
author | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-15 17:56:52 +0200 |
---|---|---|
committer | Nikolay Korolev <nickvnuk@gmail.com> | 2020-08-15 17:56:52 +0200 |
commit | 1d5e3c74256038c763bbe8d1369715bc47f99dd8 (patch) | |
tree | ee2a1dac538b95ddb92d7744a6821917e7dd3056 /src/render/Sprite2d.cpp | |
parent | submodules (diff) | |
parent | Don't react if player's targeting with melee (diff) | |
download | re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.gz re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.bz2 re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.lz re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.xz re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.tar.zst re3-1d5e3c74256038c763bbe8d1369715bc47f99dd8.zip |
Diffstat (limited to 'src/render/Sprite2d.cpp')
-rw-r--r-- | src/render/Sprite2d.cpp | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp index 453ed004..98bb6eb2 100644 --- a/src/render/Sprite2d.cpp +++ b/src/render/Sprite2d.cpp @@ -178,6 +178,7 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C z = 1.0f/RecipNearClip; } recipz = 1.0f/z; + float offset = 1.0f/1024.0f; // This is what we draw: // 0---1 @@ -189,8 +190,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C RwIm2DVertexSetCameraZ(&maVertices[0], z); RwIm2DVertexSetRecipCameraZ(&maVertices[0], recipz); RwIm2DVertexSetIntRGBA(&maVertices[0], c2.r, c2.g, c2.b, c2.a); - RwIm2DVertexSetU(&maVertices[0], 0.0f, recipz); - RwIm2DVertexSetV(&maVertices[0], 0.0f, recipz); + RwIm2DVertexSetU(&maVertices[0], 0.0f+offset, recipz); + RwIm2DVertexSetV(&maVertices[0], 0.0f+offset, recipz); RwIm2DVertexSetScreenX(&maVertices[1], r.right); RwIm2DVertexSetScreenY(&maVertices[1], r.top); @@ -198,8 +199,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C RwIm2DVertexSetCameraZ(&maVertices[1], z); RwIm2DVertexSetRecipCameraZ(&maVertices[1], recipz); RwIm2DVertexSetIntRGBA(&maVertices[1], c3.r, c3.g, c3.b, c3.a); - RwIm2DVertexSetU(&maVertices[1], 1.0f, recipz); - RwIm2DVertexSetV(&maVertices[1], 0.0f, recipz); + RwIm2DVertexSetU(&maVertices[1], 1.0f+offset, recipz); + RwIm2DVertexSetV(&maVertices[1], 0.0f+offset, recipz); RwIm2DVertexSetScreenX(&maVertices[2], r.right); RwIm2DVertexSetScreenY(&maVertices[2], r.bottom); @@ -207,8 +208,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C RwIm2DVertexSetCameraZ(&maVertices[2], z); RwIm2DVertexSetRecipCameraZ(&maVertices[2], recipz); RwIm2DVertexSetIntRGBA(&maVertices[2], c1.r, c1.g, c1.b, c1.a); - RwIm2DVertexSetU(&maVertices[2], 1.0f, recipz); - RwIm2DVertexSetV(&maVertices[2], 1.0f, recipz); + RwIm2DVertexSetU(&maVertices[2], 1.0f+offset, recipz); + RwIm2DVertexSetV(&maVertices[2], 1.0f+offset, recipz); RwIm2DVertexSetScreenX(&maVertices[3], r.left); RwIm2DVertexSetScreenY(&maVertices[3], r.bottom); @@ -216,8 +217,8 @@ CSprite2d::SetVertices(const CRect &r, const CRGBA &c0, const CRGBA &c1, const C RwIm2DVertexSetCameraZ(&maVertices[3], z); RwIm2DVertexSetRecipCameraZ(&maVertices[3], recipz); RwIm2DVertexSetIntRGBA(&maVertices[3], c0.r, c0.g, c0.b, c0.a); - RwIm2DVertexSetU(&maVertices[3], 0.0f, recipz); - RwIm2DVertexSetV(&maVertices[3], 1.0f, recipz); + RwIm2DVertexSetU(&maVertices[3], 0.0f+offset, recipz); + RwIm2DVertexSetV(&maVertices[3], 1.0f+offset, recipz); } void |