From af05cea62ffd4ca1ca9aef0af5a15f1e73f5723a Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 6 Aug 2016 00:32:25 +0200 Subject: Fix some 'for loop initial declarations only allowed in C99 or C11 mode' potential errors --- src/ppu_.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/ppu_.c') 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; -- cgit v1.2.3