From 0e521922c65787bea07d5fb3bdf198bade290e40 Mon Sep 17 00:00:00 2001 From: Hannu Hanhi Date: Sun, 7 Jun 2020 21:32:52 +0300 Subject: [PATCH] Change some unsigned ints to UINT32 --- src/hardware/hw_batching.c | 6 +++--- src/hardware/hw_drv.h | 2 +- src/hardware/r_opengl/r_opengl.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/hardware/hw_batching.c b/src/hardware/hw_batching.c index 4e11b0ab7..8abbccce0 100644 --- a/src/hardware/hw_batching.c +++ b/src/hardware/hw_batching.c @@ -32,7 +32,7 @@ int finalVertexArrayAllocSize = 65536; PolygonArrayEntry* polygonArray = NULL;// contains the polygon data from DrawPolygon, waiting to be processed int polygonArraySize = 0; -unsigned int* polygonIndexArray = NULL;// contains sorting pointers for polygonArray +UINT32* polygonIndexArray = NULL;// contains sorting pointers for polygonArray int polygonArrayAllocSize = 65536; FOutVector* unsortedVertexArray = NULL;// contains unsorted vertices and texture coordinates from DrawPolygon @@ -52,7 +52,7 @@ void HWR_StartBatching(void) finalVertexArray = malloc(finalVertexArrayAllocSize * sizeof(FOutVector)); finalVertexIndexArray = malloc(finalVertexArrayAllocSize * 3 * sizeof(UINT32)); polygonArray = malloc(polygonArrayAllocSize * sizeof(PolygonArrayEntry)); - polygonIndexArray = malloc(polygonArrayAllocSize * sizeof(unsigned int)); + polygonIndexArray = malloc(polygonArrayAllocSize * sizeof(UINT32)); unsortedVertexArray = malloc(unsortedVertexArrayAllocSize * sizeof(FOutVector)); } @@ -94,7 +94,7 @@ void HWR_ProcessPolygon(FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPt polygonArray = new_array; // also need to redo the index array, dont need to copy it though free(polygonIndexArray); - polygonIndexArray = malloc(polygonArrayAllocSize * sizeof(unsigned int)); + polygonIndexArray = malloc(polygonArrayAllocSize * sizeof(UINT32)); } while (unsortedVertexArraySize + (int)iNumPts > unsortedVertexArrayAllocSize) diff --git a/src/hardware/hw_drv.h b/src/hardware/hw_drv.h index 6cc45a363..50ac6cbec 100644 --- a/src/hardware/hw_drv.h +++ b/src/hardware/hw_drv.h @@ -36,7 +36,7 @@ EXPORT void HWRAPI(SetPalette) (RGBA_t *ppal); EXPORT void HWRAPI(FinishUpdate) (INT32 waitvbl); EXPORT void HWRAPI(Draw2DLine) (F2DCoord *v1, F2DCoord *v2, RGBA_t Color); EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags); -EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, unsigned int *IndexArray); +EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, UINT32 *IndexArray); EXPORT void HWRAPI(RenderSkyDome) (INT32 tex, INT32 texture_width, INT32 texture_height, FTransform transform); EXPORT void HWRAPI(SetBlend) (FBITFIELD PolyFlags); EXPORT void HWRAPI(ClearBuffer) (FBOOLEAN ColorMask, FBOOLEAN DepthMask, FRGBAFloat *ClearColor); diff --git a/src/hardware/r_opengl/r_opengl.c b/src/hardware/r_opengl/r_opengl.c index bbeec6e0b..f08fae105 100644 --- a/src/hardware/r_opengl/r_opengl.c +++ b/src/hardware/r_opengl/r_opengl.c @@ -2073,7 +2073,7 @@ EXPORT void HWRAPI(DrawPolygon) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUI Clamp2D(GL_TEXTURE_WRAP_T); } -EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, unsigned int *IndexArray) +EXPORT void HWRAPI(DrawIndexedTriangles) (FSurfaceInfo *pSurf, FOutVector *pOutVerts, FUINT iNumPts, FBITFIELD PolyFlags, UINT32 *IndexArray) { PreparePolygon(pSurf, pOutVerts, PolyFlags);