1
0
Fork 0
mirror of https://git.rip/DMCA_FUCKER/re3.git synced 2024-12-24 01:50:00 +00:00

Fix TempVertexBuffer overflow

This commit is contained in:
Sergeanur 2020-07-18 13:09:21 +03:00
parent 30384bb4ef
commit cf5dd6289e
3 changed files with 5 additions and 5 deletions

View file

@ -5,8 +5,8 @@
int32 TempBufferVerticesStored; int32 TempBufferVerticesStored;
int32 TempBufferIndicesStored; int32 TempBufferIndicesStored;
RwIm2DVertex TempVertexBuffer[TEMPBUFFERVERTSIZE]; RwIm3DVertex TempBufferRenderVertices[TEMPBUFFERVERTSIZE];
RwIm3DVertex *TempBufferRenderVertices = (RwIm3DVertex * )TempVertexBuffer; RwIm2DVertex *TempVertexBuffer = (RwIm2DVertex*)TempBufferRenderVertices;
RwImVertexIndex TempBufferRenderIndexList[TEMPBUFFERINDEXSIZE]; RwImVertexIndex TempBufferRenderIndexList[TEMPBUFFERINDEXSIZE];
int RenderBuffer::VerticesToBeStored; int RenderBuffer::VerticesToBeStored;

View file

@ -14,6 +14,6 @@ public:
extern int32 TempBufferVerticesStored; extern int32 TempBufferVerticesStored;
extern int32 TempBufferIndicesStored; extern int32 TempBufferIndicesStored;
extern RwIm2DVertex TempVertexBuffer[TEMPBUFFERVERTSIZE]; extern RwIm2DVertex *TempVertexBuffer;
extern RwIm3DVertex *TempBufferRenderVertices; extern RwIm3DVertex TempBufferRenderVertices[TEMPBUFFERVERTSIZE];
extern RwImVertexIndex TempBufferRenderIndexList[TEMPBUFFERINDEXSIZE]; extern RwImVertexIndex TempBufferRenderIndexList[TEMPBUFFERINDEXSIZE];

View file

@ -449,7 +449,7 @@ CSprite2d::AddToBuffer(const CRect &r, const CRGBA &c, float u0, float v0, float
bool bool
CSprite2d::IsVertexBufferFull() CSprite2d::IsVertexBufferFull()
{ {
return (nextBufferVertex > ARRAY_SIZE(TempVertexBuffer)-128-4 || nextBufferIndex > ARRAY_SIZE(TempBufferRenderIndexList)-6); return (nextBufferVertex > TEMPBUFFERINDEXSIZE-128-4 || nextBufferIndex > ARRAY_SIZE(TempBufferRenderIndexList)-6);
} }
void void