summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortwinaphex2016-08-06 00:32:25 +0200
committertwinaphex2016-08-06 00:32:25 +0200
commitaf05cea62ffd4ca1ca9aef0af5a15f1e73f5723a (patch)
tree99e34e2088ec9e3ec818ed446ce48208f1284cb9
parentf2054c2033d86a4d736285d1cbce229c7ab4ae7a (diff)
downloadsnes9x2002-af05cea62ffd4ca1ca9aef0af5a15f1e73f5723a.tar.gz
snes9x2002-af05cea62ffd4ca1ca9aef0af5a15f1e73f5723a.tar.bz2
snes9x2002-af05cea62ffd4ca1ca9aef0af5a15f1e73f5723a.zip
Fix some 'for loop initial declarations only allowed in C99 or C11 mode' potential
errors
-rw-r--r--src/ppu_.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/ppu_.c b/src/ppu_.c
index d0150b8..8fcfc4c 100644
--- a/src/ppu_.c
+++ b/src/ppu_.c
@@ -2141,6 +2141,9 @@ uint8 S9xGetCPU(uint16 Address)
void S9xResetPPU()
{
+ uint8 B;
+ int Sprite;
+
PPU.BGMode = 0;
PPU.BG3Priority = 0;
PPU.Brightness = 0;
@@ -2150,7 +2153,7 @@ void S9xResetPPU()
PPU.VMA.FullGraphicCount = 0;
PPU.VMA.Shift = 0;
- for (uint8 B = 0; B != 4; B++)
+ for (B = 0; B < 4; B++)
{
PPU.BG[B].SCBase = 0;
PPU.BG[B].VOffset = 0;
@@ -2188,7 +2191,8 @@ void S9xResetPPU()
PPU.FirstSprite = 0;
PPU.LastSprite = 127;
- for (int Sprite = 0; Sprite < 128; Sprite++)
+
+ for (Sprite = 0; Sprite < 128; Sprite++)
{
PPU.OBJ[Sprite].HPos = 0;
PPU.OBJ[Sprite].VPos = 0;