summaryrefslogtreecommitdiffstats
path: root/src/render/RenderBuffer.cpp
diff options
context:
space:
mode:
authorFire-Head <Fire-Head@users.noreply.github.com>2019-07-11 02:22:01 +0200
committerFire-Head <Fire-Head@users.noreply.github.com>2019-07-11 02:33:28 +0200
commitaed8218ef16679b36e5d869e79128315d9140794 (patch)
tree67e43ef67838a648c7dc8c39decb4c48b082fea2 /src/render/RenderBuffer.cpp
parentthe great reorganization (diff)
downloadre3-aed8218ef16679b36e5d869e79128315d9140794.tar
re3-aed8218ef16679b36e5d869e79128315d9140794.tar.gz
re3-aed8218ef16679b36e5d869e79128315d9140794.tar.bz2
re3-aed8218ef16679b36e5d869e79128315d9140794.tar.lz
re3-aed8218ef16679b36e5d869e79128315d9140794.tar.xz
re3-aed8218ef16679b36e5d869e79128315d9140794.tar.zst
re3-aed8218ef16679b36e5d869e79128315d9140794.zip
Diffstat (limited to '')
-rw-r--r--src/render/RenderBuffer.cpp10
1 files changed, 5 insertions, 5 deletions
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();
}