From a8f89a01aaec3c65e6e3587d48c484f5c6e4255f Mon Sep 17 00:00:00 2001 From: Sylvain Date: Fri, 23 Apr 2021 12:00:14 +0200 Subject: [PATCH] Change 'size_indice' to 'size_indices' --- include/SDL_render.h | 4 +-- src/render/SDL_render.c | 32 ++++++++++++------------ src/render/SDL_sysrender.h | 2 +- src/render/direct3d/SDL_render_d3d.c | 8 +++--- src/render/direct3d11/SDL_render_d3d11.c | 8 +++--- src/render/metal/SDL_render_metal.m | 8 +++--- src/render/opengl/SDL_render_gl.c | 8 +++--- src/render/opengles/SDL_render_gles.c | 8 +++--- src/render/opengles2/SDL_render_gles2.c | 8 +++--- src/render/software/SDL_render_sw.c | 14 +++++------ 10 files changed, 50 insertions(+), 50 deletions(-) diff --git a/include/SDL_render.h b/include/SDL_render.h index 056ce3982..068efc99d 100644 --- a/include/SDL_render.h +++ b/include/SDL_render.h @@ -1484,7 +1484,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometry(SDL_Renderer *renderer, * \param num_vertices Number of vertices. * \param indices (optional) An array of indices into the 'vertices' arrays, if NULL all vertices will be rendered in sequential order. * \param num_indices Number of indices. - * \param size_indice Indice size: 1 (byte), 2 (short), 4 (int) + * \param size_indices Index size: 1 (byte), 2 (short), 4 (int) * * \return 0 on success, or -1 if the operation is not supported */ @@ -1494,7 +1494,7 @@ extern DECLSPEC int SDLCALL SDL_RenderGeometryRaw(SDL_Renderer *renderer, const int *color, int color_stride, const float *uv, int uv_stride, int num_vertices, - const void *indices, int num_indices, int size_indice); + const void *indices, int num_indices, int size_indices); /** * Read pixels from the current rendering target to an array of pixels. diff --git a/src/render/SDL_render.c b/src/render/SDL_render.c index 5640e9467..172b7c860 100644 --- a/src/render/SDL_render.c +++ b/src/render/SDL_render.c @@ -579,7 +579,7 @@ QueueCmdGeometry(SDL_Renderer *renderer, SDL_Texture *texture, const int *color, int color_stride, const float *uv, int uv_stride, int num_vertices, - const void *indices, int num_indices, int size_indice, + const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { SDL_RenderCommand *cmd; @@ -592,7 +592,7 @@ QueueCmdGeometry(SDL_Renderer *renderer, SDL_Texture *texture, if (cmd != NULL) { retval = renderer->QueueGeometry(renderer, cmd, texture, xy, xy_stride, color, color_stride, uv, uv_stride, - num_vertices, indices, num_indices, size_indice, + num_vertices, indices, num_indices, size_indices, scale_x, scale_y); if (retval < 0) { cmd->command = SDL_RENDERCMD_NO_OP; @@ -3356,9 +3356,9 @@ SDL_RenderGeometry(SDL_Renderer *renderer, int color_stride = sizeof (SDL_Vertex); const float *uv = (const float *)((const Uint8 *)vertices + SDL_OFFSETOF(SDL_Vertex, tex_coord)); int uv_stride = sizeof (SDL_Vertex); - int size_indice = 4; + int size_indices = 4; - return SDL_RenderGeometryRaw(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, indices, num_indices, size_indice); + return SDL_RenderGeometryRaw(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, indices, num_indices, size_indices); } #if SDL_HAVE_RENDER_GEOMETRY @@ -3432,7 +3432,7 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, const int *color, int color_stride, const float *uv, int uv_stride, int num_vertices, - const void *indices, int num_indices, int size_indice) + const void *indices, int num_indices, int size_indices) { int i; int retval = 0; @@ -3463,15 +3463,15 @@ SDL_SW_RenderGeometryRaw(SDL_Renderer *renderer, int C = -1; /* Third vertex of current triangle */ int C2 = -1; /* Last, vertex of previous triangle */ - if (size_indice == 4) { + if (size_indices == 4) { k0 = ((const Uint32 *)indices)[i]; k1 = ((const Uint32 *)indices)[i + 1]; k2 = ((const Uint32 *)indices)[i + 2]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { k0 = ((const Uint16 *)indices)[i]; k1 = ((const Uint16 *)indices)[i + 1]; k2 = ((const Uint16 *)indices)[i + 2]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { k0 = ((const Uint8 *)indices)[i]; k1 = ((const Uint8 *)indices)[i + 1]; k2 = ((const Uint8 *)indices)[i + 2]; @@ -3708,7 +3708,7 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer, const int *color, int color_stride, const float *uv, int uv_stride, int num_vertices, - const void *indices, int num_indices, int size_indice) + const void *indices, int num_indices, int size_indices) { #if SDL_HAVE_RENDER_GEOMETRY int i; @@ -3746,11 +3746,11 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer, } if (indices) { - if (size_indice != 1 && size_indice != 2 && size_indice != 4) { - return SDL_InvalidParamError("size_indice"); + if (size_indices != 1 && size_indice != 2 && size_indice != 4) { + return SDL_InvalidParamError("size_indices"); } } else { - size_indice = 0; + size_indices = 0; } /* Don't draw while we're hidden */ @@ -3780,9 +3780,9 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer, if (indices) { for (i = 0; i < num_indices; ++i) { int j; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; } else { j = ((const Uint8 *)indices)[i]; @@ -3801,13 +3801,13 @@ SDL_RenderGeometryRaw(SDL_Renderer *renderer, if (renderer->info.flags & SDL_RENDERER_SOFTWARE) { return SDL_SW_RenderGeometryRaw(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, - indices, num_indices, size_indice); + indices, num_indices, size_indices); } retval = QueueCmdGeometry(renderer, texture, xy, xy_stride, color, color_stride, uv, uv_stride, num_vertices, - indices, num_indices, size_indice, + indices, num_indices, size_indices, renderer->scale.x, renderer->scale.y); return retval < 0 ? retval : FlushRenderCommandsIfNotBatching(renderer); diff --git a/src/render/SDL_sysrender.h b/src/render/SDL_sysrender.h index dca54401a..f569b51ed 100644 --- a/src/render/SDL_sysrender.h +++ b/src/render/SDL_sysrender.h @@ -132,7 +132,7 @@ struct SDL_Renderer #if SDL_HAVE_RENDER_GEOMETRY int (*QueueGeometry) (SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y); #endif diff --git a/src/render/direct3d/SDL_render_d3d.c b/src/render/direct3d/SDL_render_d3d.c index 27b661f8a..34fb485a5 100644 --- a/src/render/direct3d/SDL_render_d3d.c +++ b/src/render/direct3d/SDL_render_d3d.c @@ -1024,7 +1024,7 @@ D3D_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * t static int D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { int i; @@ -1041,11 +1041,11 @@ D3D_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *t int j; float *xy_; SDL_Color col_; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i; diff --git a/src/render/direct3d11/SDL_render_d3d11.c b/src/render/direct3d11/SDL_render_d3d11.c index dfa2d1296..436881be6 100644 --- a/src/render/direct3d11/SDL_render_d3d11.c +++ b/src/render/direct3d11/SDL_render_d3d11.c @@ -1869,7 +1869,7 @@ D3D11_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * static int D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { int i; @@ -1886,11 +1886,11 @@ D3D11_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture int j; float *xy_; SDL_Color col_; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i; diff --git a/src/render/metal/SDL_render_metal.m b/src/render/metal/SDL_render_metal.m index 2e1dcad99..48312c3e8 100644 --- a/src/render/metal/SDL_render_metal.m +++ b/src/render/metal/SDL_render_metal.m @@ -1322,7 +1322,7 @@ METAL_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * static int METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { int count = indices ? num_indices : num_vertices; @@ -1336,11 +1336,11 @@ METAL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture for (int i = 0; i < count; i++) { int j; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i; diff --git a/src/render/opengl/SDL_render_gl.c b/src/render/opengl/SDL_render_gl.c index 387dac782..a8453308a 100644 --- a/src/render/opengl/SDL_render_gl.c +++ b/src/render/opengl/SDL_render_gl.c @@ -1055,7 +1055,7 @@ GL_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * te static int GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { GL_TextureData *texturedata = NULL; @@ -1079,11 +1079,11 @@ GL_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te int j; float *xy_; SDL_Color col_; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i; diff --git a/src/render/opengles/SDL_render_gles.c b/src/render/opengles/SDL_render_gles.c index 1c42625dc..7ffc34984 100644 --- a/src/render/opengles/SDL_render_gles.c +++ b/src/render/opengles/SDL_render_gles.c @@ -759,7 +759,7 @@ GLES_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * static int GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { GLES_TextureData *texturedata = NULL; @@ -783,11 +783,11 @@ GLES_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture * int j; float *xy_; SDL_Color col_; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i; diff --git a/src/render/opengles2/SDL_render_gles2.c b/src/render/opengles2/SDL_render_gles2.c index 4e43a506a..ae57bcb75 100644 --- a/src/render/opengles2/SDL_render_gles2.c +++ b/src/render/opengles2/SDL_render_gles2.c @@ -941,7 +941,7 @@ GLES2_QueueCopyEx(SDL_Renderer * renderer, SDL_RenderCommand *cmd, SDL_Texture * static int GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { int i; @@ -960,11 +960,11 @@ GLES2_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture int j; float *xy_; int col_; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i; diff --git a/src/render/software/SDL_render_sw.c b/src/render/software/SDL_render_sw.c index bd09d5c33..233b79279 100644 --- a/src/render/software/SDL_render_sw.c +++ b/src/render/software/SDL_render_sw.c @@ -579,7 +579,7 @@ typedef struct GeometryCopyData static int SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *texture, const float *xy, int xy_stride, const int *color, int color_stride, const float *uv, int uv_stride, - int num_vertices, const void *indices, int num_indices, int size_indice, + int num_vertices, const void *indices, int num_indices, int size_indices, float scale_x, float scale_y) { int i; @@ -601,11 +601,11 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te float *xy_; SDL_Color col_; float *uv_; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i; @@ -634,11 +634,11 @@ SW_QueueGeometry(SDL_Renderer *renderer, SDL_RenderCommand *cmd, SDL_Texture *te int j; float *xy_; SDL_Color col_; - if (size_indice == 4) { + if (size_indices == 4) { j = ((const Uint32 *)indices)[i]; - } else if (size_indice == 2) { + } else if (size_indices == 2) { j = ((const Uint16 *)indices)[i]; - } else if (size_indice == 1) { + } else if (size_indices == 1) { j = ((const Uint8 *)indices)[i]; } else { j = i;