From a644c4e9ceb440f53e31dd39f11a9a3c859ffb44 Mon Sep 17 00:00:00 2001 From: Fire-Head Date: Thu, 11 Jul 2019 03:22:01 +0300 Subject: WaterLevel done --- src/render/RenderBuffer.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/render/RenderBuffer.cpp') diff --git a/src/render/RenderBuffer.cpp b/src/render/RenderBuffer.cpp index 9a1ed58d..1b91156e 100644 --- a/src/render/RenderBuffer.cpp +++ b/src/render/RenderBuffer.cpp @@ -5,7 +5,7 @@ int32 &TempBufferVerticesStored = *(int32*)0x8F5F78; int32 &TempBufferIndicesStored = *(int32*)0x8F1A4C; -RwIm3DVertex *TempVertexBuffer = (RwIm3DVertex*)0x862330; +RwIm3DVertex *TempBufferRenderVertices = (RwIm3DVertex*)0x862330; RwImVertexIndex *TempBufferRenderIndexList = (RwImVertexIndex*)0x846288; int RenderBuffer::VerticesToBeStored; @@ -21,12 +21,12 @@ RenderBuffer::ClearRenderBuffer(void) void RenderBuffer::StartStoring(int numIndices, int numVertices, RwImVertexIndex **indexStart, RwIm3DVertex **vertexStart) { - if(TempBufferIndicesStored + numIndices >= 1024) + if(TempBufferIndicesStored + numIndices >= TEMPBUFFERINDEXSIZE) RenderStuffInBuffer(); - if(TempBufferVerticesStored + numVertices >= 256) + if(TempBufferVerticesStored + numVertices >= TEMPBUFFERVERTSIZE) RenderStuffInBuffer(); *indexStart = &TempBufferRenderIndexList[TempBufferIndicesStored]; - *vertexStart = &TempVertexBuffer[TempBufferVerticesStored]; + *vertexStart = &TempBufferRenderVertices[TempBufferVerticesStored]; IndicesToBeStored = numIndices; VerticesToBeStored = numVertices; } @@ -44,7 +44,7 @@ RenderBuffer::StopStoring(void) void RenderBuffer::RenderStuffInBuffer(void) { - if(TempBufferVerticesStored && RwIm3DTransform(TempVertexBuffer, TempBufferVerticesStored, nil, rwIM3D_VERTEXUV)){ + if(TempBufferVerticesStored && RwIm3DTransform(TempBufferRenderVertices, TempBufferVerticesStored, nil, rwIM3D_VERTEXUV)){ RwIm3DRenderIndexedPrimitive(rwPRIMTYPETRILIST, TempBufferRenderIndexList, TempBufferIndicesStored); RwIm3DEnd(); } -- cgit v1.2.3