mirror of
https://github.com/halpz/re3.git
synced 2025-07-21 16:49:48 +00:00
Squeeze performance option, minor fixes
Fixes are already in miami
This commit is contained in:
@ -152,9 +152,9 @@ void CMovingThings::Shutdown()
|
||||
|
||||
void CMovingThings::Update()
|
||||
{
|
||||
const int TIME_SPAN = 64; // frames to process all aMovingThings
|
||||
|
||||
int16 i;
|
||||
#ifndef SQUEEZE_PERFORMANCE
|
||||
const int TIME_SPAN = 64; // frames to process all aMovingThings
|
||||
|
||||
int block = CTimer::GetFrameCounter() % TIME_SPAN;
|
||||
|
||||
@ -167,6 +167,7 @@ void CMovingThings::Update()
|
||||
if (aMovingThings[i].m_nHidden == 0)
|
||||
aMovingThings[i].Update();
|
||||
}
|
||||
#endif
|
||||
|
||||
for (i = 0; i < ARRAY_SIZE(aScrollBars); ++i)
|
||||
{
|
||||
|
@ -68,8 +68,8 @@ class CFont
|
||||
static int16 Size[MAX_FONTS][193];
|
||||
#endif
|
||||
static int16 NewLine;
|
||||
static CSprite2d Sprite[MAX_FONTS];
|
||||
public:
|
||||
static CSprite2d Sprite[MAX_FONTS];
|
||||
static CFontDetails Details;
|
||||
|
||||
static void Initialise(void);
|
||||
|
@ -73,8 +73,12 @@ CRenderer::PreRender(void)
|
||||
for(i = 0; i < ms_nNoOfVisibleEntities; i++)
|
||||
ms_aVisibleEntityPtrs[i]->PreRender();
|
||||
|
||||
for(i = 0; i < ms_nNoOfInVisibleEntities; i++)
|
||||
for (i = 0; i < ms_nNoOfInVisibleEntities; i++) {
|
||||
#ifdef SQUEEZE_PERFORMANCE
|
||||
if (ms_aInVisibleEntityPtrs[i]->IsVehicle() && ((CVehicle*)ms_aInVisibleEntityPtrs[i])->IsHeli())
|
||||
#endif
|
||||
ms_aInVisibleEntityPtrs[i]->PreRender();
|
||||
}
|
||||
|
||||
for(node = CVisibilityPlugins::m_alphaEntityList.head.next;
|
||||
node != &CVisibilityPlugins::m_alphaEntityList.tail;
|
||||
|
@ -4,7 +4,11 @@ class CVehicle;
|
||||
|
||||
enum {
|
||||
// NB: not all values are allowed, check the code
|
||||
#ifdef SQUEEZE_PERFORMANCE
|
||||
NUM_RUBBISH_SHEETS = 32
|
||||
#else
|
||||
NUM_RUBBISH_SHEETS = 64
|
||||
#endif
|
||||
};
|
||||
|
||||
class COneSheet
|
||||
|
@ -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]);
|
||||
|
Reference in New Issue
Block a user