... | ... |
@@ -83,8 +83,8 @@ void |
83 | 83 |
ppu_1bpp(Ppu *p, Uint8 layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy) |
84 | 84 |
{ |
85 | 85 |
Uint16 v, h; |
86 |
- for(v = 0; v < 8; v++) |
|
87 |
- for(h = 0; h < 8; h++) { |
|
86 |
+ for(v = 0; v < 8; ++v) |
|
87 |
+ for(h = 0; h < 8; ++h) { |
|
88 | 88 |
Uint8 ch1 = (sprite[v] >> (7 - h)) & 0x1; |
89 | 89 |
if(ch1 || blending[4][color]) |
90 | 90 |
ppu_write(p, |
... | ... |
@@ -99,8 +99,8 @@ void |
99 | 99 |
ppu_2bpp(Ppu *p, Uint8 layer, Uint16 x, Uint16 y, Uint8 *sprite, Uint8 color, Uint8 flipx, Uint8 flipy) |
100 | 100 |
{ |
101 | 101 |
Uint16 v, h; |
102 |
- for(v = 0; v < 8; v++) |
|
103 |
- for(h = 0; h < 8; h++) { |
|
102 |
+ for(v = 0; v < 8; ++v) |
|
103 |
+ for(h = 0; h < 8; ++h) { |
|
104 | 104 |
Uint8 ch1 = ((sprite[v] >> (7 - h)) & 0x1); |
105 | 105 |
Uint8 ch2 = ((sprite[v + 8] >> (7 - h)) & 0x1); |
106 | 106 |
Uint8 ch = ch1 + ch2 * 2; |
... | ... |
@@ -58,7 +58,7 @@ static int scmp(char *a, char *b, int len) { int i = 0; while(a[i] == b[i]) if |
58 | 58 |
static int sihx(char *s) { int i = 0; char c; while((c = s[i++])) if(!(c >= '0' && c <= '9') && !(c >= 'a' && c <= 'f')) return 0; return i > 1; } /* string is hexadecimal */ |
59 | 59 |
static int shex(char *s) { int n = 0, i = 0; char c; while((c = s[i++])) if(c >= '0' && c <= '9') n = n * 16 + (c - '0'); else if(c >= 'a' && c <= 'f') n = n * 16 + 10 + (c - 'a'); return n; } /* string to num */ |
60 | 60 |
static int slen(char *s) { int i = 0; while(s[i]) ++i; return i; } /* string length */ |
61 |
-static char *scpy(char *src, char *dst, int len) { int i = 0; while((dst[i] = src[i]) && i < len - 2) i++; dst[i + 1] = '\0'; return dst; } /* string copy */ |
|
61 |
+static char *scpy(char *src, char *dst, int len) { int i = 0; while((dst[i] = src[i]) && i < len - 2) ++i; dst[i + 1] = '\0'; return dst; } /* string copy */ |
|
62 | 62 |
static char *scat(char *dst, const char *src) { char *ptr = dst + slen(dst); while(*src) *ptr++ = *src++; *ptr = '\0'; return dst; } /* string cat */ |
63 | 63 |
|
64 | 64 |
/* clang-format on */ |
... | ... |
@@ -116,7 +116,7 @@ findopcode(char *s) |
116 | 116 |
i |= (1 << 7); /* mode: keep */ |
117 | 117 |
else |
118 | 118 |
return 0; /* failed to match */ |
119 |
- m++; |
|
119 |
+ ++m; |
|
120 | 120 |
} |
121 | 121 |
return i; |
122 | 122 |
} |