diff options
author | eray orçunus <erayorcunus@gmail.com> | 2020-08-03 03:00:12 +0200 |
---|---|---|
committer | eray orçunus <erayorcunus@gmail.com> | 2020-08-03 15:00:32 +0200 |
commit | e14252914e9bd4cf7702479b5e0b050b935ba4aa (patch) | |
tree | df42291b9b6745f86097de4d58fc55e6a64b1b8c /src/render/Sprite2d.cpp | |
parent | Move sdk and eax (diff) | |
download | re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.gz re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.bz2 re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.lz re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.xz re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.tar.zst re3-e14252914e9bd4cf7702479b5e0b050b935ba4aa.zip |
Diffstat (limited to '')
-rw-r--r-- | src/render/Sprite2d.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/render/Sprite2d.cpp b/src/render/Sprite2d.cpp index 52b85018..453ed004 100644 --- a/src/render/Sprite2d.cpp +++ b/src/render/Sprite2d.cpp @@ -4,6 +4,7 @@ #include "Draw.h" #include "Camera.h" #include "Sprite2d.h" +#include "Font.h" RwIm2DVertex CSprite2d::maVertices[8]; float CSprite2d::RecipNearClip; @@ -27,14 +28,18 @@ CSprite2d::InitPerFrame(void) mCurrentBank = 0; for(i = 0; i < 10; i++) mCurrentSprite[i] = 0; +#ifndef SQUEEZE_PERFORMANCE for(i = 0; i < 10; i++) mpBankTextures[i] = nil; +#endif } int32 CSprite2d::GetBank(int32 n, RwTexture *tex) { +#ifndef SQUEEZE_PERFORMANCE mpBankTextures[mCurrentBank] = tex; +#endif mCurrentSprite[mCurrentBank] = 0; mBankStart[mCurrentBank+1] = mBankStart[mCurrentBank] + n; return mCurrentBank++; @@ -59,8 +64,12 @@ CSprite2d::DrawBank(int32 bank) { if(mCurrentSprite[bank] == 0) return; +#ifndef SQUEEZE_PERFORMANCE RwRenderStateSet(rwRENDERSTATETEXTURERASTER, mpBankTextures[bank] ? RwTextureGetRaster(mpBankTextures[bank]) : nil); +#else + CFont::Sprite[bank].SetRenderState(); +#endif RwRenderStateSet(rwRENDERSTATEVERTEXALPHAENABLE, (void*)TRUE); RwRenderStateSet(rwRENDERSTATETEXTUREFILTER, (void*)rwFILTERLINEAR); RwIm2DRenderPrimitive(rwPRIMTYPETRILIST, &maBankVertices[6*mBankStart[bank]], 6*mCurrentSprite[bank]); |