Added a couple of null guards against invalid quads / textures in the render() call, with JLOG calls to trace this out if we should hit one of these cases. (Reformatted tabbing in the function while I was there.)
This commit is contained in:
+13
-3
@@ -534,7 +534,19 @@ void JRenderer::PlotArray(float *x, float *y, int count, PIXEL_TYPE color)
|
||||
// v3---v4
|
||||
void JRenderer::RenderQuad(JQuad* quad, float xo, float yo, float angle, float xScale, float yScale)
|
||||
{
|
||||
if (mCurrentTextureFormat != quad->mTex->mTextureFormat){
|
||||
if (quad == NULL)
|
||||
{
|
||||
JLOG("JRenderer::RenderQuad: NULL quad pointer!");
|
||||
return;
|
||||
}
|
||||
if (quad->mTex == NULL)
|
||||
{
|
||||
JLOG("JRenderer::RenderQuad:: invalid texture!");
|
||||
return;
|
||||
}
|
||||
|
||||
if (mCurrentTextureFormat != quad->mTex->mTextureFormat)
|
||||
{
|
||||
mCurrentTextureFormat = quad->mTex->mTextureFormat;
|
||||
sceGuTexMode(mCurrentTextureFormat, 0, 0, mSwizzle);
|
||||
}
|
||||
@@ -551,8 +563,6 @@ void JRenderer::RenderQuad(JQuad* quad, float xo, float yo, float angle, float x
|
||||
mCurrentBlend = quad->mBlend;
|
||||
}
|
||||
|
||||
|
||||
|
||||
//float destWidth = quad->mWidth*quad->mScaleX;
|
||||
float destHeight = quad->mHeight*yScale;
|
||||
float x = xo - quad->mHotSpotX*xScale;
|
||||
|
||||
Reference in New Issue
Block a user