Sfoglia il codice sorgente

rename local pointer vars 'pixel' to 'pixels'

Reference issue: https://github.com/libsdl-org/SDL/issues/12749.
Ozkan Sezer 1 settimana fa
parent
commit
0fdfa925f2

+ 4 - 4
src/events/SDL_mouse.c

@@ -1477,7 +1477,7 @@ SDL_Cursor *SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h,
     SDL_Surface *surface;
     SDL_Surface *surface;
     SDL_Cursor *cursor;
     SDL_Cursor *cursor;
     int x, y;
     int x, y;
-    Uint32 *pixel;
+    Uint32 *pixels;
     Uint8 datab = 0, maskb = 0;
     Uint8 datab = 0, maskb = 0;
     const Uint32 black = 0xFF000000;
     const Uint32 black = 0xFF000000;
     const Uint32 white = 0xFFFFFFFF;
     const Uint32 white = 0xFFFFFFFF;
@@ -1498,16 +1498,16 @@ SDL_Cursor *SDL_CreateCursor(const Uint8 *data, const Uint8 *mask, int w, int h,
         return NULL;
         return NULL;
     }
     }
     for (y = 0; y < h; ++y) {
     for (y = 0; y < h; ++y) {
-        pixel = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch);
+        pixels = (Uint32 *)((Uint8 *)surface->pixels + y * surface->pitch);
         for (x = 0; x < w; ++x) {
         for (x = 0; x < w; ++x) {
             if ((x % 8) == 0) {
             if ((x % 8) == 0) {
                 datab = *data++;
                 datab = *data++;
                 maskb = *mask++;
                 maskb = *mask++;
             }
             }
             if (maskb & 0x80) {
             if (maskb & 0x80) {
-                *pixel++ = (datab & 0x80) ? black : white;
+                *pixels++ = (datab & 0x80) ? black : white;
             } else {
             } else {
-                *pixel++ = (datab & 0x80) ? inverted : transparent;
+                *pixels++ = (datab & 0x80) ? inverted : transparent;
             }
             }
             datab <<= 1;
             datab <<= 1;
             maskb <<= 1;
             maskb <<= 1;

+ 94 - 93
src/render/software/SDL_draw.h

@@ -18,6 +18,7 @@
      misrepresented as being the original software.
      misrepresented as being the original software.
   3. This notice may not be removed or altered from any source distribution.
   3. This notice may not be removed or altered from any source distribution.
 */
 */
+
 #include "SDL_internal.h"
 #include "SDL_internal.h"
 
 
 #include "../../video/SDL_surface_c.h"
 #include "../../video/SDL_surface_c.h"
@@ -29,7 +30,7 @@
 #define DRAW_MUL(_a, _b) (((unsigned)(_a) * (_b)) / 255)
 #define DRAW_MUL(_a, _b) (((unsigned)(_a) * (_b)) / 255)
 
 
 #define DRAW_FASTSETPIXEL(type) \
 #define DRAW_FASTSETPIXEL(type) \
-    *pixel = (type)color
+    *pixels = (type)color
 
 
 #define DRAW_FASTSETPIXEL1 DRAW_FASTSETPIXEL(Uint8)
 #define DRAW_FASTSETPIXEL1 DRAW_FASTSETPIXEL(Uint8)
 #define DRAW_FASTSETPIXEL2 DRAW_FASTSETPIXEL(Uint16)
 #define DRAW_FASTSETPIXEL2 DRAW_FASTSETPIXEL(Uint16)
@@ -126,7 +127,7 @@
 
 
 #define DRAW_SETPIXELXY(x, y, type, bpp, op)                                     \
 #define DRAW_SETPIXELXY(x, y, type, bpp, op)                                     \
     do {                                                                         \
     do {                                                                         \
-        type *pixel = (type *)((Uint8 *)dst->pixels + (y)*dst->pitch + (x)*bpp); \
+        type *pixels = (type *)((Uint8 *)dst->pixels + (y)*dst->pitch + (x)*bpp);\
         op;                                                                      \
         op;                                                                      \
     } while (0)
     } while (0)
 
 
@@ -135,27 +136,27 @@
  */
  */
 
 
 #define DRAW_SETPIXEL_RGB555 \
 #define DRAW_SETPIXEL_RGB555 \
-    DRAW_SETPIXEL(RGB555_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL(RGB555_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_RGB555                           \
 #define DRAW_SETPIXEL_BLEND_RGB555                           \
-    DRAW_SETPIXEL_BLEND(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
-                        RGB555_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND(RGB_FROM_RGB555(*pixels, sr, sg, sb),\
+                        RGB555_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGB555                           \
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGB555                           \
-    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
-                                RGB555_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_RGB555(*pixels, sr, sg, sb),\
+                                RGB555_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_ADD_RGB555                           \
 #define DRAW_SETPIXEL_ADD_RGB555                           \
-    DRAW_SETPIXEL_ADD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
-                      RGB555_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_ADD(RGB_FROM_RGB555(*pixels, sr, sg, sb),\
+                      RGB555_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MOD_RGB555                           \
 #define DRAW_SETPIXEL_MOD_RGB555                           \
-    DRAW_SETPIXEL_MOD(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
-                      RGB555_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_MOD(RGB_FROM_RGB555(*pixels, sr, sg, sb),\
+                      RGB555_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MUL_RGB555                           \
 #define DRAW_SETPIXEL_MUL_RGB555                           \
-    DRAW_SETPIXEL_MUL(RGB_FROM_RGB555(*pixel, sr, sg, sb), \
-                      RGB555_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_MUL(RGB_FROM_RGB555(*pixels, sr, sg, sb),\
+                      RGB555_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXELXY_RGB555(x, y) \
 #define DRAW_SETPIXELXY_RGB555(x, y) \
     DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB555)
     DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB555)
@@ -180,27 +181,27 @@
  */
  */
 
 
 #define DRAW_SETPIXEL_RGB565 \
 #define DRAW_SETPIXEL_RGB565 \
-    DRAW_SETPIXEL(RGB565_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL(RGB565_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_RGB565                           \
 #define DRAW_SETPIXEL_BLEND_RGB565                           \
-    DRAW_SETPIXEL_BLEND(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
-                        RGB565_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND(RGB_FROM_RGB565(*pixels, sr, sg, sb),\
+                        RGB565_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGB565                           \
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGB565                           \
-    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
-                                RGB565_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_RGB565(*pixels, sr, sg, sb),\
+                                RGB565_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_ADD_RGB565                           \
 #define DRAW_SETPIXEL_ADD_RGB565                           \
-    DRAW_SETPIXEL_ADD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
-                      RGB565_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_ADD(RGB_FROM_RGB565(*pixels, sr, sg, sb),\
+                      RGB565_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MOD_RGB565                           \
 #define DRAW_SETPIXEL_MOD_RGB565                           \
-    DRAW_SETPIXEL_MOD(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
-                      RGB565_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_MOD(RGB_FROM_RGB565(*pixels, sr, sg, sb),\
+                      RGB565_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MUL_RGB565                           \
 #define DRAW_SETPIXEL_MUL_RGB565                           \
-    DRAW_SETPIXEL_MUL(RGB_FROM_RGB565(*pixel, sr, sg, sb), \
-                      RGB565_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_MUL(RGB_FROM_RGB565(*pixels, sr, sg, sb),\
+                      RGB565_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXELXY_RGB565(x, y) \
 #define DRAW_SETPIXELXY_RGB565(x, y) \
     DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB565)
     DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB565)
@@ -225,27 +226,27 @@
  */
  */
 
 
 #define DRAW_SETPIXEL_XRGB8888 \
 #define DRAW_SETPIXEL_XRGB8888 \
-    DRAW_SETPIXEL(XRGB8888_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL(XRGB8888_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_XRGB8888                           \
 #define DRAW_SETPIXEL_BLEND_XRGB8888                           \
-    DRAW_SETPIXEL_BLEND(RGB_FROM_XRGB8888(*pixel, sr, sg, sb), \
-                        XRGB8888_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND(RGB_FROM_XRGB8888(*pixels, sr, sg, sb),\
+                        XRGB8888_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_CLAMPED_XRGB8888                           \
 #define DRAW_SETPIXEL_BLEND_CLAMPED_XRGB8888                           \
-    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_XRGB8888(*pixel, sr, sg, sb), \
-                                XRGB8888_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_XRGB8888(*pixels, sr, sg, sb),\
+                                XRGB8888_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_ADD_XRGB8888                           \
 #define DRAW_SETPIXEL_ADD_XRGB8888                           \
-    DRAW_SETPIXEL_ADD(RGB_FROM_XRGB8888(*pixel, sr, sg, sb), \
-                      XRGB8888_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_ADD(RGB_FROM_XRGB8888(*pixels, sr, sg, sb),\
+                      XRGB8888_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MOD_XRGB8888                           \
 #define DRAW_SETPIXEL_MOD_XRGB8888                           \
-    DRAW_SETPIXEL_MOD(RGB_FROM_XRGB8888(*pixel, sr, sg, sb), \
-                      XRGB8888_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_MOD(RGB_FROM_XRGB8888(*pixels, sr, sg, sb),\
+                      XRGB8888_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MUL_XRGB8888                           \
 #define DRAW_SETPIXEL_MUL_XRGB8888                           \
-    DRAW_SETPIXEL_MUL(RGB_FROM_XRGB8888(*pixel, sr, sg, sb), \
-                      XRGB8888_FROM_RGB(*pixel, sr, sg, sb))
+    DRAW_SETPIXEL_MUL(RGB_FROM_XRGB8888(*pixels, sr, sg, sb),\
+                      XRGB8888_FROM_RGB(*pixels, sr, sg, sb))
 
 
 #define DRAW_SETPIXELXY_XRGB8888(x, y) \
 #define DRAW_SETPIXELXY_XRGB8888(x, y) \
     DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_XRGB8888)
     DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_XRGB8888)
@@ -270,27 +271,27 @@
  */
  */
 
 
 #define DRAW_SETPIXEL_ARGB8888 \
 #define DRAW_SETPIXEL_ARGB8888 \
-    DRAW_SETPIXEL(ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
+    DRAW_SETPIXEL(ARGB8888_FROM_RGBA(*pixels, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_BLEND_ARGB8888                                \
 #define DRAW_SETPIXEL_BLEND_ARGB8888                                \
-    DRAW_SETPIXEL_BLEND(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
-                        ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
+    DRAW_SETPIXEL_BLEND(RGBA_FROM_ARGB8888(*pixels, sr, sg, sb, sa),\
+                        ARGB8888_FROM_RGBA(*pixels, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_BLEND_CLAMPED_ARGB8888                                \
 #define DRAW_SETPIXEL_BLEND_CLAMPED_ARGB8888                                \
-    DRAW_SETPIXEL_BLEND_CLAMPED(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
-                                ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
+    DRAW_SETPIXEL_BLEND_CLAMPED(RGBA_FROM_ARGB8888(*pixels, sr, sg, sb, sa),\
+                                ARGB8888_FROM_RGBA(*pixels, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_ADD_ARGB8888                                \
 #define DRAW_SETPIXEL_ADD_ARGB8888                                \
-    DRAW_SETPIXEL_ADD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
-                      ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
+    DRAW_SETPIXEL_ADD(RGBA_FROM_ARGB8888(*pixels, sr, sg, sb, sa),\
+                      ARGB8888_FROM_RGBA(*pixels, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_MOD_ARGB8888                                \
 #define DRAW_SETPIXEL_MOD_ARGB8888                                \
-    DRAW_SETPIXEL_MOD(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
-                      ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
+    DRAW_SETPIXEL_MOD(RGBA_FROM_ARGB8888(*pixels, sr, sg, sb, sa),\
+                      ARGB8888_FROM_RGBA(*pixels, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_MUL_ARGB8888                                \
 #define DRAW_SETPIXEL_MUL_ARGB8888                                \
-    DRAW_SETPIXEL_MUL(RGBA_FROM_ARGB8888(*pixel, sr, sg, sb, sa), \
-                      ARGB8888_FROM_RGBA(*pixel, sr, sg, sb, sa))
+    DRAW_SETPIXEL_MUL(RGBA_FROM_ARGB8888(*pixels, sr, sg, sb, sa),\
+                      ARGB8888_FROM_RGBA(*pixels, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXELXY_ARGB8888(x, y) \
 #define DRAW_SETPIXELXY_ARGB8888(x, y) \
     DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ARGB8888)
     DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_ARGB8888)
@@ -315,27 +316,27 @@
  */
  */
 
 
 #define DRAW_SETPIXEL_RGB \
 #define DRAW_SETPIXEL_RGB \
-    DRAW_SETPIXEL(PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
+    DRAW_SETPIXEL(PIXEL_FROM_RGB(*pixels, fmt, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_RGB                                  \
 #define DRAW_SETPIXEL_BLEND_RGB                                  \
-    DRAW_SETPIXEL_BLEND(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
-                        PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND(RGB_FROM_PIXEL(*pixels, fmt, sr, sg, sb),\
+                        PIXEL_FROM_RGB(*pixels, fmt, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGB                                  \
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGB                                  \
-    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
-                                PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
+    DRAW_SETPIXEL_BLEND_CLAMPED(RGB_FROM_PIXEL(*pixels, fmt, sr, sg, sb),\
+                                PIXEL_FROM_RGB(*pixels, fmt, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_ADD_RGB                                  \
 #define DRAW_SETPIXEL_ADD_RGB                                  \
-    DRAW_SETPIXEL_ADD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
-                      PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
+    DRAW_SETPIXEL_ADD(RGB_FROM_PIXEL(*pixels, fmt, sr, sg, sb),\
+                      PIXEL_FROM_RGB(*pixels, fmt, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MOD_RGB                                  \
 #define DRAW_SETPIXEL_MOD_RGB                                  \
-    DRAW_SETPIXEL_MOD(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
-                      PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
+    DRAW_SETPIXEL_MOD(RGB_FROM_PIXEL(*pixels, fmt, sr, sg, sb),\
+                      PIXEL_FROM_RGB(*pixels, fmt, sr, sg, sb))
 
 
 #define DRAW_SETPIXEL_MUL_RGB                                  \
 #define DRAW_SETPIXEL_MUL_RGB                                  \
-    DRAW_SETPIXEL_MUL(RGB_FROM_PIXEL(*pixel, fmt, sr, sg, sb), \
-                      PIXEL_FROM_RGB(*pixel, fmt, sr, sg, sb))
+    DRAW_SETPIXEL_MUL(RGB_FROM_PIXEL(*pixels, fmt, sr, sg, sb),\
+                      PIXEL_FROM_RGB(*pixels, fmt, sr, sg, sb))
 
 
 #define DRAW_SETPIXELXY2_RGB(x, y) \
 #define DRAW_SETPIXELXY2_RGB(x, y) \
     DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB)
     DRAW_SETPIXELXY(x, y, Uint16, 2, DRAW_SETPIXEL_RGB)
@@ -378,27 +379,27 @@
  */
  */
 
 
 #define DRAW_SETPIXEL_RGBA \
 #define DRAW_SETPIXEL_RGBA \
-    DRAW_SETPIXEL(PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
+    DRAW_SETPIXEL(PIXEL_FROM_RGBA(*pixels, fmt, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_BLEND_RGBA                                      \
 #define DRAW_SETPIXEL_BLEND_RGBA                                      \
-    DRAW_SETPIXEL_BLEND(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
-                        PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
+    DRAW_SETPIXEL_BLEND(RGBA_FROM_PIXEL(*pixels, fmt, sr, sg, sb, sa),\
+                        PIXEL_FROM_RGBA(*pixels, fmt, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGBA                                      \
 #define DRAW_SETPIXEL_BLEND_CLAMPED_RGBA                                      \
-    DRAW_SETPIXEL_BLEND_CLAMPED(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
-                                PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
+    DRAW_SETPIXEL_BLEND_CLAMPED(RGBA_FROM_PIXEL(*pixels, fmt, sr, sg, sb, sa),\
+                                PIXEL_FROM_RGBA(*pixels, fmt, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_ADD_RGBA                                      \
 #define DRAW_SETPIXEL_ADD_RGBA                                      \
-    DRAW_SETPIXEL_ADD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
-                      PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
+    DRAW_SETPIXEL_ADD(RGBA_FROM_PIXEL(*pixels, fmt, sr, sg, sb, sa),\
+                      PIXEL_FROM_RGBA(*pixels, fmt, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_MOD_RGBA                                      \
 #define DRAW_SETPIXEL_MOD_RGBA                                      \
-    DRAW_SETPIXEL_MOD(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
-                      PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
+    DRAW_SETPIXEL_MOD(RGBA_FROM_PIXEL(*pixels, fmt, sr, sg, sb, sa),\
+                      PIXEL_FROM_RGBA(*pixels, fmt, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXEL_MUL_RGBA                                      \
 #define DRAW_SETPIXEL_MUL_RGBA                                      \
-    DRAW_SETPIXEL_MUL(RGBA_FROM_PIXEL(*pixel, fmt, sr, sg, sb, sa), \
-                      PIXEL_FROM_RGBA(*pixel, fmt, sr, sg, sb, sa))
+    DRAW_SETPIXEL_MUL(RGBA_FROM_PIXEL(*pixels, fmt, sr, sg, sb, sa),\
+                      PIXEL_FROM_RGBA(*pixels, fmt, sr, sg, sb, sa))
 
 
 #define DRAW_SETPIXELXY4_RGBA(x, y) \
 #define DRAW_SETPIXELXY4_RGBA(x, y) \
     DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGBA)
     DRAW_SETPIXELXY(x, y, Uint32, 4, DRAW_SETPIXEL_RGBA)
@@ -428,21 +429,21 @@
 #define HLINE(type, op, draw_end)                              \
 #define HLINE(type, op, draw_end)                              \
     {                                                          \
     {                                                          \
         int length;                                            \
         int length;                                            \
-        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel); \
-        type *pixel;                                           \
+        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel);  \
+        type *pixels;                                          \
         if (x1 <= x2) {                                        \
         if (x1 <= x2) {                                        \
-            pixel = (type *)dst->pixels + y1 * pitch + x1;     \
+            pixels = (type *)dst->pixels + y1 * pitch + x1;    \
             length = draw_end ? (x2 - x1 + 1) : (x2 - x1);     \
             length = draw_end ? (x2 - x1 + 1) : (x2 - x1);     \
         } else {                                               \
         } else {                                               \
-            pixel = (type *)dst->pixels + y1 * pitch + x2;     \
+            pixels = (type *)dst->pixels + y1 * pitch + x2;    \
             if (!draw_end) {                                   \
             if (!draw_end) {                                   \
-                ++pixel;                                       \
+                ++pixels;                                      \
             }                                                  \
             }                                                  \
             length = draw_end ? (x1 - x2 + 1) : (x1 - x2);     \
             length = draw_end ? (x1 - x2 + 1) : (x1 - x2);     \
         }                                                      \
         }                                                      \
         while (length--) {                                     \
         while (length--) {                                     \
             op;                                                \
             op;                                                \
-            ++pixel;                                           \
+            ++pixels;                                          \
         }                                                      \
         }                                                      \
     }
     }
 
 
@@ -450,21 +451,21 @@
 #define VLINE(type, op, draw_end)                              \
 #define VLINE(type, op, draw_end)                              \
     {                                                          \
     {                                                          \
         int length;                                            \
         int length;                                            \
-        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel); \
-        type *pixel;                                           \
+        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel);  \
+        type *pixels;                                          \
         if (y1 <= y2) {                                        \
         if (y1 <= y2) {                                        \
-            pixel = (type *)dst->pixels + y1 * pitch + x1;     \
+            pixels = (type *)dst->pixels + y1 * pitch + x1;    \
             length = draw_end ? (y2 - y1 + 1) : (y2 - y1);     \
             length = draw_end ? (y2 - y1 + 1) : (y2 - y1);     \
         } else {                                               \
         } else {                                               \
-            pixel = (type *)dst->pixels + y2 * pitch + x1;     \
+            pixels = (type *)dst->pixels + y2 * pitch + x1;    \
             if (!draw_end) {                                   \
             if (!draw_end) {                                   \
-                pixel += pitch;                                \
+                pixels += pitch;                               \
             }                                                  \
             }                                                  \
             length = draw_end ? (y1 - y2 + 1) : (y1 - y2);     \
             length = draw_end ? (y1 - y2 + 1) : (y1 - y2);     \
         }                                                      \
         }                                                      \
         while (length--) {                                     \
         while (length--) {                                     \
             op;                                                \
             op;                                                \
-            pixel += pitch;                                    \
+            pixels += pitch;                                   \
         }                                                      \
         }                                                      \
     }
     }
 
 
@@ -472,10 +473,10 @@
 #define DLINE(type, op, draw_end)                              \
 #define DLINE(type, op, draw_end)                              \
     {                                                          \
     {                                                          \
         int length;                                            \
         int length;                                            \
-        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel); \
-        type *pixel;                                           \
+        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel);  \
+        type *pixels;                                          \
         if (y1 <= y2) {                                        \
         if (y1 <= y2) {                                        \
-            pixel = (type *)dst->pixels + y1 * pitch + x1;     \
+            pixels = (type *)dst->pixels + y1 * pitch + x1;    \
             if (x1 <= x2) {                                    \
             if (x1 <= x2) {                                    \
                 ++pitch;                                       \
                 ++pitch;                                       \
             } else {                                           \
             } else {                                           \
@@ -483,14 +484,14 @@
             }                                                  \
             }                                                  \
             length = (y2 - y1);                                \
             length = (y2 - y1);                                \
         } else {                                               \
         } else {                                               \
-            pixel = (type *)dst->pixels + y2 * pitch + x2;     \
+            pixels = (type *)dst->pixels + y2 * pitch + x2;    \
             if (x2 <= x1) {                                    \
             if (x2 <= x1) {                                    \
                 ++pitch;                                       \
                 ++pitch;                                       \
             } else {                                           \
             } else {                                           \
                 --pitch;                                       \
                 --pitch;                                       \
             }                                                  \
             }                                                  \
             if (!draw_end) {                                   \
             if (!draw_end) {                                   \
-                pixel += pitch;                                \
+                pixels += pitch;                               \
             }                                                  \
             }                                                  \
             length = (y1 - y2);                                \
             length = (y1 - y2);                                \
         }                                                      \
         }                                                      \
@@ -499,7 +500,7 @@
         }                                                      \
         }                                                      \
         while (length--) {                                     \
         while (length--) {                                     \
             op;                                                \
             op;                                                \
-            pixel += pitch;                                    \
+            pixels += pitch;                                   \
         }                                                      \
         }                                                      \
     }
     }
 
 
@@ -692,9 +693,9 @@
     do {                                                               \
     do {                                                               \
         int width = rect->w;                                           \
         int width = rect->w;                                           \
         int height = rect->h;                                          \
         int height = rect->h;                                          \
-        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel); \
+        int pitch = (dst->pitch / dst->fmt->bytes_per_pixel);          \
         int skip = pitch - width;                                      \
         int skip = pitch - width;                                      \
-        type *pixel = (type *)dst->pixels + rect->y * pitch + rect->x; \
+        type *pixels = (type *)dst->pixels + rect->y * pitch + rect->x;\
         while (height--) {                                             \
         while (height--) {                                             \
             {                                                          \
             {                                                          \
                 int n = (width + 3) / 4;                               \
                 int n = (width + 3) / 4;                               \
@@ -702,22 +703,22 @@
                 case 0:                                                \
                 case 0:                                                \
                     do {                                               \
                     do {                                               \
                         op;                                            \
                         op;                                            \
-                        pixel++;                                       \
+                        pixels++;                                      \
                         SDL_FALLTHROUGH;                               \
                         SDL_FALLTHROUGH;                               \
                     case 3:                                            \
                     case 3:                                            \
                         op;                                            \
                         op;                                            \
-                        pixel++;                                       \
+                        pixels++;                                      \
                         SDL_FALLTHROUGH;                               \
                         SDL_FALLTHROUGH;                               \
                     case 2:                                            \
                     case 2:                                            \
                         op;                                            \
                         op;                                            \
-                        pixel++;                                       \
+                        pixels++;                                      \
                         SDL_FALLTHROUGH;                               \
                         SDL_FALLTHROUGH;                               \
                     case 1:                                            \
                     case 1:                                            \
                         op;                                            \
                         op;                                            \
-                        pixel++;                                       \
+                        pixels++;                                      \
                     } while (--n > 0);                                 \
                     } while (--n > 0);                                 \
                 }                                                      \
                 }                                                      \
             }                                                          \
             }                                                          \
-            pixel += skip;                                             \
+            pixels += skip;                                            \
         }                                                              \
         }                                                              \
     } while (0)
     } while (0)

+ 5 - 5
src/render/software/SDL_drawline.c

@@ -32,18 +32,18 @@ static void SDL_DrawLine1(SDL_Surface *dst, int x1, int y1, int x2, int y2, Uint
     if (y1 == y2) {
     if (y1 == y2) {
         int length;
         int length;
         int pitch = (dst->pitch / dst->fmt->bytes_per_pixel);
         int pitch = (dst->pitch / dst->fmt->bytes_per_pixel);
-        Uint8 *pixel;
+        Uint8 *pixels;
         if (x1 <= x2) {
         if (x1 <= x2) {
-            pixel = (Uint8 *)dst->pixels + y1 * pitch + x1;
+            pixels = (Uint8 *)dst->pixels + y1 * pitch + x1;
             length = draw_end ? (x2 - x1 + 1) : (x2 - x1);
             length = draw_end ? (x2 - x1 + 1) : (x2 - x1);
         } else {
         } else {
-            pixel = (Uint8 *)dst->pixels + y1 * pitch + x2;
+            pixels = (Uint8 *)dst->pixels + y1 * pitch + x2;
             if (!draw_end) {
             if (!draw_end) {
-                ++pixel;
+                ++pixels;
             }
             }
             length = draw_end ? (x1 - x2 + 1) : (x1 - x2);
             length = draw_end ? (x1 - x2 + 1) : (x1 - x2);
         }
         }
-        SDL_memset(pixel, color, length);
+        SDL_memset(pixels, color, length);
     } else if (x1 == x2) {
     } else if (x1 == x2) {
         VLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end);
         VLINE(Uint8, DRAW_FASTSETPIXEL1, draw_end);
     } else if (ABS(x1 - x2) == ABS(y1 - y2)) {
     } else if (ABS(x1 - x2) == ABS(y1 - y2)) {

+ 12 - 12
src/video/stb_image.h

@@ -6543,26 +6543,26 @@ static void *stbi__psd_load(stbi__context *s, int *x, int *y, int *comp, int req
    if (channelCount >= 4) {
    if (channelCount >= 4) {
       if (ri->bits_per_channel == 16) {
       if (ri->bits_per_channel == 16) {
          for (i=0; i < w*h; ++i) {
          for (i=0; i < w*h; ++i) {
-            stbi__uint16 *pixel = (stbi__uint16 *) out + 4*i;
-            if (pixel[3] != 0 && pixel[3] != 65535) {
-               float a = pixel[3] / 65535.0f;
+            stbi__uint16 *pixels = (stbi__uint16 *) out + 4*i;
+            if (pixels[3] != 0 && pixels[3] != 65535) {
+               float a = pixels[3] / 65535.0f;
                float ra = 1.0f / a;
                float ra = 1.0f / a;
                float inv_a = 65535.0f * (1 - ra);
                float inv_a = 65535.0f * (1 - ra);
-               pixel[0] = (stbi__uint16) (pixel[0]*ra + inv_a);
-               pixel[1] = (stbi__uint16) (pixel[1]*ra + inv_a);
-               pixel[2] = (stbi__uint16) (pixel[2]*ra + inv_a);
+               pixels[0] = (stbi__uint16) (pixels[0]*ra + inv_a);
+               pixels[1] = (stbi__uint16) (pixels[1]*ra + inv_a);
+               pixels[2] = (stbi__uint16) (pixels[2]*ra + inv_a);
             }
             }
          }
          }
       } else {
       } else {
          for (i=0; i < w*h; ++i) {
          for (i=0; i < w*h; ++i) {
-            unsigned char *pixel = out + 4*i;
-            if (pixel[3] != 0 && pixel[3] != 255) {
-               float a = pixel[3] / 255.0f;
+            unsigned char *pixels = out + 4*i;
+            if (pixels[3] != 0 && pixels[3] != 255) {
+               float a = pixels[3] / 255.0f;
                float ra = 1.0f / a;
                float ra = 1.0f / a;
                float inv_a = 255.0f * (1 - ra);
                float inv_a = 255.0f * (1 - ra);
-               pixel[0] = (unsigned char) (pixel[0]*ra + inv_a);
-               pixel[1] = (unsigned char) (pixel[1]*ra + inv_a);
-               pixel[2] = (unsigned char) (pixel[2]*ra + inv_a);
+               pixels[0] = (unsigned char) (pixels[0]*ra + inv_a);
+               pixels[1] = (unsigned char) (pixels[1]*ra + inv_a);
+               pixels[2] = (unsigned char) (pixels[2]*ra + inv_a);
             }
             }
          }
          }
       }
       }