diff options
-rw-r--r-- | Makefile | 16 | ||||
-rw-r--r-- | src/cpuexec.h | 4 | ||||
-rw-r--r-- | src/gfx.c | 187 | ||||
-rw-r--r-- | src/ppu_.c | 16 | ||||
-rw-r--r-- | src/tile.c | 124 |
5 files changed, 188 insertions, 159 deletions
@@ -56,7 +56,7 @@ else ifeq ($(platform), theos_ios) ASM_CPU = 0 ASM_SPC700 = 0 else ifeq ($(platform), ps3) - TARGET := $(TARGET_NAME)_libretro_ps3.a + TARGET := $(TARGET_NAME)_libretro_$(platform).a CC = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-gcc.exe AR = $(CELL_SDK)/host-win32/ppu/bin/ppu-lv2-ar.exe CFLAGS += -DBLARGG_BIG_ENDIAN=1 -D__ppc__ @@ -73,15 +73,21 @@ else ifeq ($(platform), xenon) AR = xenon-ar CFLAGS += -D__LIBXENON__ -m32 -D__ppc__ STATIC_LINKING := 1 -else ifeq ($(platform), wii) - TARGET := $(TARGET_NAME)_libretro_wii.a +else ifeq ($(platform), ngc) + TARGET := $(TARGET_NAME)_libretro_$(platform).a CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc AR = $(DEVKITPPC)/bin/powerpc-eabi-ar CFLAGS += -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float -DBLARGG_BIG_ENDIAN=1 -D__ppc__ STATIC_LINKING := 1 +else ifeq ($(platform), wii) + TARGET := $(TARGET_NAME)_libretro_$(platform).a + CC = $(DEVKITPPC)/bin/powerpc-eabi-gcc + AR = $(DEVKITPPC)/bin/powerpc-eabi-ar + CFLAGS += -DGEKKO -mrvl -mcpu=750 -meabi -mhard-float -DBLARGG_BIG_ENDIAN=1 -D__ppc__ -DHW_RVL + STATIC_LINKING := 1 # Vita else ifeq ($(platform), vita) - TARGET := $(TARGET_NAME)_libretro_vita.a + TARGET := $(TARGET_NAME)_libretro_$(platform).a CC = $(VITASDK)/bin/arm-vita-eabi-gcc$(EXE_EXT) CXX = $(VITASDK)/bin/arm-vita-eabi-g++$(EXE_EXT) AR = $(VITASDK)/bin/arm-vita-eabi-ar$(EXE_EXT) @@ -96,7 +102,7 @@ else ifeq ($(platform), vita) STATIC_LINKING := 1 # CTR (3DS) else ifeq ($(platform), ctr) - TARGET := $(TARGET_NAME)_libretro_ctr.a + TARGET := $(TARGET_NAME)_libretro_$(platform).a CC = $(DEVKITARM)/bin/arm-none-eabi-gcc$(EXE_EXT) CXX = $(DEVKITARM)/bin/arm-none-eabi-g++$(EXE_EXT) AR = $(DEVKITARM)/bin/arm-none-eabi-ar$(EXE_EXT) diff --git a/src/cpuexec.h b/src/cpuexec.h index e5872de..f298e2c 100644 --- a/src/cpuexec.h +++ b/src/cpuexec.h @@ -51,11 +51,7 @@ typedef struct
{
-#ifdef __WIN32__
- void (__cdecl* S9xOpcode)(void);
-#else
void (*S9xOpcode)(void);
-#endif
} SOpcodes;
typedef struct
@@ -240,10 +240,10 @@ void DrawHiResClippedTile16(uint32 Tile, int32 Offset, void DrawHiResTile16(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount); -bool8_32 S9xGraphicsInit() +bool8_32 S9xGraphicsInit(void) { - register uint32 PixelOdd = 1; - register uint32 PixelEven = 2; + uint32 PixelOdd = 1; + uint32 PixelEven = 2; #ifdef GFX_MULTI_FORMAT if (GFX.BuildPixel == NULL) @@ -253,11 +253,11 @@ bool8_32 S9xGraphicsInit() uint8 bitshift; for (bitshift = 0; bitshift < 4; bitshift++) { - register int i; + int i; for (i = 0; i < 16; i++) { - register uint32 h = 0; - register uint32 l = 0; + uint32 h = 0; + uint32 l = 0; #if defined(MSB_FIRST) if (i & 8) @@ -2117,6 +2117,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) } #define RENDER_BACKGROUND_MODE7(FUNC) \ + uint32 clip, Line; \ uint8 *VRAM1 = Memory.VRAM + 1; \ if (GFX.r2130 & 1) \ { \ @@ -2140,7 +2141,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) Screen += GFX.StartY * GFX_PITCH; \ SLineMatrixData *l = &LineMatrixData [GFX.StartY]; \ \ - for (uint32 Line = GFX.StartY; Line <= GFX.EndY; Line++, Screen += GFX_PITCH, l++) \ + for (Line = GFX.StartY; Line <= GFX.EndY; Line++, Screen += GFX_PITCH, l++) \ { \ int yy; \ \ @@ -2162,7 +2163,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) int BB = l->MatrixB * yy + (CentreX << 8); \ int DD = l->MatrixD * yy + (CentreY << 8); \ \ - for (uint32 clip = 0; clip < ClipCount; clip++) \ + for (clip = 0; clip < ClipCount; clip++) \ { \ if (GFX.pCurrentClip->Count [bg]) \ { \ @@ -2199,10 +2200,11 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) \ if (!PPU.Mode7Repeat) \ { \ - for (int x = startx; x != endx; x += dir, AA += aa, CC += cc, p++) \ + int x; \ + for (x = startx; x != endx; x += dir, AA += aa, CC += cc, p++) \ { \ - register int X = ((AA + BB) >> 8) & 0x3ff; \ - register int Y = ((CC + DD) >> 8) & 0x3ff; \ + int X = ((AA + BB) >> 8) & 0x3ff; \ + int Y = ((CC + DD) >> 8) & 0x3ff; \ uint8 *TileData = VRAM1 + (Memory.VRAM[((Y & ~7) << 5) + ((X >> 2) & ~1)] << 7); \ uint32 b = *(TileData + ((Y & 7) << 4) + ((X & 7) << 1)); \ if (b) \ @@ -2213,7 +2215,8 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) } \ else \ { \ - for (int x = startx; x != endx; x += dir, AA += aa, CC += cc, p++) \ + int x; \ + for (x = startx; x != endx; x += dir, AA += aa, CC += cc, p++) \ { \ int X = ((AA + BB) >> 8); \ int Y = ((CC + DD) >> 8); \ @@ -2252,6 +2255,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) } #define RENDER_BACKGROUND_MODE7ADDSUB(DEPTH, FUNC) \ + uint32 clip, Line; \ uint8 *VRAM1 = Memory.VRAM + 1; \ if (GFX.r2130 & 1) \ { \ @@ -2276,7 +2280,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) uint8 *Depth = GFX.DB + GFX.StartY * GFX_PPL; \ SLineMatrixData *l = &LineMatrixData [GFX.StartY]; \ \ - for (uint32 Line = GFX.StartY; Line <= GFX.EndY; Line++, Screen += GFX_PITCH, Depth += GFX_PPL, l++) \ + for (Line = GFX.StartY; Line <= GFX.EndY; Line++, Screen += GFX_PITCH, Depth += GFX_PPL, l++) \ { \ int yy; \ \ @@ -2298,7 +2302,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) int BB = l->MatrixB * yy + (CentreX << 8); \ int DD = l->MatrixD * yy + (CentreY << 8); \ \ - for (uint32 clip = 0; clip < ClipCount; clip++) \ + for (clip = 0; clip < ClipCount; clip++) \ { \ if (GFX.pCurrentClip->Count [bg]) \ { \ @@ -2336,7 +2340,8 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) \ if (!PPU.Mode7Repeat) \ { \ - for (int x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ + int x; \ + for (x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ { \ int X = ((AA + BB) >> 8) & 0x3ff; \ int Y = ((CC + DD) >> 8) & 0x3ff; \ @@ -2351,7 +2356,8 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) } \ else \ { \ - for (int x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ + int x; \ + for (x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ { \ int X = ((AA + BB) >> 8); \ int Y = ((CC + DD) >> 8); \ @@ -2392,6 +2398,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) } #define RENDER_BACKGROUND_MODE7PRIO(FUNC) \ + uint32 clip, Line; \ uint8 *VRAM1 = Memory.VRAM + 1; \ if (GFX.r2130 & 1) \ { \ @@ -2416,7 +2423,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) uint8 *Depth = GFX.DB + GFX.StartY * GFX_PPL; \ SLineMatrixData *l = &LineMatrixData [GFX.StartY]; \ \ - for (uint32 Line = GFX.StartY; Line <= GFX.EndY; Line++, Screen += GFX_PITCH, Depth += GFX_PPL, l++) \ + for (Line = GFX.StartY; Line <= GFX.EndY; Line++, Screen += GFX_PITCH, Depth += GFX_PPL, l++) \ { \ int yy; \ \ @@ -2438,7 +2445,7 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) int BB = l->MatrixB * yy + (CentreX << 8); \ int DD = l->MatrixD * yy + (CentreY << 8); \ \ - for (uint32 clip = 0; clip < ClipCount; clip++) \ + for (clip = 0; clip < ClipCount; clip++) \ { \ if (GFX.pCurrentClip->Count [bg]) \ { \ @@ -2476,7 +2483,8 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) \ if (!PPU.Mode7Repeat) \ { \ - for (int x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ + int x; \ + for (x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ { \ int X = ((AA + BB) >> 8) & 0x3ff; \ int Y = ((CC + DD) >> 8) & 0x3ff; \ @@ -2492,7 +2500,8 @@ static inline void DrawBackground(uint32 BGMode, uint32 bg, uint8 Z1, uint8 Z2) } \ else \ { \ - for (int x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ + int x; \ + for (x = startx; x != endx; x += dir, AA += aa, CC += cc, p++, d++) \ { \ int X = ((AA + BB) >> 8); \ int Y = ((CC + DD) >> 8); \ @@ -2903,13 +2912,15 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } if (!IPPU.DoubleWidthPixels) { + uint32 y; // The game has switched from lo-res to hi-res mode part way down // the screen. Scale any existing lo-res pixels on screen - for (register uint32 y = 0; y < GFX.StartY; y++) + for (y = 0; y < GFX.StartY; y++) { - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + 255; - register uint16* q = (uint16*)(GFX.Screen + y * GFX_PITCH) + 510; - for (register int x = 255; x >= 0; x--, p--, q -= 2) + int x; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + 255; + uint16* q = (uint16*)(GFX.Screen + y * GFX_PITCH) + 510; + for (x = 255; x >= 0; x--, p--, q -= 2) * q = *(q + 1) = *p; } IPPU.DoubleWidthPixels = TRUE; @@ -2984,9 +2995,11 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } #else // NOT RC_OPTIMIZED - // loop around all of the lines being updated - for (uint32 y = starty; y <= endy; y++) + /* loop around all of the lines being updated */ + uint32 y; + for (y = starty; y <= endy; y++) { + uint32 c; // Clear the subZbuffer memset32((uint32_t*)(GFX.SubZBuffer + y * GFX_ZPITCH), 0, IPPU.RenderedScreenWidth >> 2); @@ -2999,7 +3012,7 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) memset32((uint32_t*)(GFX.SubScreen + y * GFX_PITCH), black, IPPU.RenderedScreenWidth >> 1); // loop through all window clippings - for (uint32 c = 0; c < pClip->Count [5]; c++) + for (c = 0; c < pClip->Count [5]; c++) { if (pClip->Right [c][5] > pClip->Left [c][5]) { @@ -3012,8 +3025,8 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) // the main screen that will allow the sub-screen // 'underneath' to show through. - register uint16* p = (uint16*)(GFX.SubScreen + y * GFX_PITCH); - register uint16* q = p + pClip->Right [c][5] * x2; + uint16* p = (uint16*)(GFX.SubScreen + y * GFX_PITCH); + uint16* q = p + pClip->Right [c][5] * x2; p += pClip->Left [c][5] * x2; while (p < q) @@ -3073,8 +3086,9 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } #else // NOT RC_OPTIMIZED - // loop through all of the lines to be updated - for (uint32 y = starty; y <= endy; y++) + /* loop through all of the lines to be updated */ + uint32 y; + for (y = starty; y <= endy; y++) { // Clear the Zbuffer memset32((uint32_t*)(GFX.ZBuffer + y * GFX_ZPITCH), 0, @@ -3106,11 +3120,12 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) if (IPPU.Clip [0].Count [5]) { - for (uint32 y = starty; y <= endy; y++) + uint32 y; + for (y = starty; y <= endy; y++) { - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH); - register uint8* d = GFX.SubZBuffer + y * GFX_ZPITCH ; - register uint8* e = d + IPPU.RenderedScreenWidth; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH); + uint8* d = GFX.SubZBuffer + y * GFX_ZPITCH ; + uint8* e = d + IPPU.RenderedScreenWidth; while (d < e) { @@ -3128,6 +3143,7 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) RenderScreen(GFX.Screen, FALSE, FALSE, MAIN_SCREEN_DEPTH); if (SUB_OR_ADD(5)) { + uint32 y; uint32 back = IPPU.ScreenColors [0]; uint32 Left = 0; uint32 Right = 256; @@ -3135,8 +3151,9 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) pClip = &IPPU.Clip [0]; - for (uint32 y = starty; y <= endy; y++) + for (y = starty; y <= endy; y++) { + uint32 b; if (!(Count = pClip->Count [5])) { Left = 0; @@ -3144,7 +3161,7 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) Count = 1; } - for (uint32 b = 0; b < Count; b++) + for (b = 0; b < Count; b++) { if (pClip->Count [5]) { @@ -3159,10 +3176,10 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) if (GFX.r2131 & 0x40) { // Subtract, halving the result. - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; - register uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; - register uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; - register uint8* e = d + Right; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; + uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; + uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; + uint8* e = d + Right; uint16 back_fixed = COLOR_SUB(back, GFX.FixedColour); d += Left; @@ -3188,10 +3205,10 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) else { // Subtract - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; - register uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; - register uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; - register uint8* e = d + Right; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; + uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; + uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; + uint8* e = d + Right; uint16 back_fixed = COLOR_SUB(back, GFX.FixedColour); d += Left; @@ -3217,10 +3234,10 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } else if (GFX.r2131 & 0x40) { - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; - register uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; - register uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; - register uint8* e = d + Right; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; + uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; + uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; + uint8* e = d + Right; uint16 back_fixed = COLOR_ADD(back, GFX.FixedColour); d += Left; while (d < e) @@ -3244,10 +3261,10 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } else if (back != 0) { - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; - register uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; - register uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; - register uint8* e = d + Right; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; + uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; + uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; + uint8* e = d + Right; uint16 back_fixed = COLOR_ADD(back, GFX.FixedColour); d += Left; while (d < e) @@ -3277,10 +3294,10 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) // copy the sub-screen to the main screen // or fill it with the back-drop colour if the // sub-screen is clear. - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; - register uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; - register uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; - register uint8* e = d + Right; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; + uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; + uint8* s = GFX.SubZBuffer + y * GFX_ZPITCH + Left; + uint8* e = d + Right; d += Left; while (d < e) { @@ -3308,21 +3325,23 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } else { + uint32 y; // Subscreen not being added to back uint32 back = IPPU.ScreenColors [0] | (IPPU.ScreenColors [0] << 16); pClip = &IPPU.Clip [0]; if (pClip->Count [5]) { - for (uint32 y = starty; y <= endy; y++) + for (y = starty; y <= endy; y++) { - for (uint32 b = 0; b < pClip->Count [5]; b++) + uint32 b; + for (b = 0; b < pClip->Count [5]; b++) { uint32 Left = pClip->Left [b][5] * x2; uint32 Right = pClip->Right [b][5] * x2; - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; - register uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; - register uint8* e = d + Right; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + Left; + uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; + uint8* e = d + Right; d += Left; while (d < e) @@ -3336,11 +3355,11 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } else { - for (uint32 y = starty; y <= endy; y++) + for (y = starty; y <= endy; y++) { - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH); - register uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; - register uint8* e = d + 256 * x2; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH); + uint8* d = GFX.ZBuffer + y * GFX_ZPITCH; + uint8* e = d + 256 * x2; while (d < e) { @@ -3404,20 +3423,22 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } } #else - // loop through all of the lines that are going to be updated as part of this screen update - for (uint32 y = starty; y <= endy; y++) + /* loop through all of the lines that are going to be updated as part of this screen update */ + uint32 y; + for (y = starty; y <= endy; y++) { memset32((uint32_t*)(GFX.Screen + y * GFX_PITCH), black, IPPU.RenderedScreenWidth >> 1); if (black != back) { - for (uint32 c = 0; c < IPPU.Clip [0].Count [5]; c++) + uint32 c; + for (c = 0; c < IPPU.Clip [0].Count [5]; c++) { if (IPPU.Clip [0].Right [c][5] > IPPU.Clip [0].Left [c][5]) { - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH); // get pointer to current line in screen buffer - register uint16* q = p + IPPU.Clip [0].Right [c][5] * x2; // get pointer to end of line + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH); // get pointer to current line in screen buffer + uint16* q = p + IPPU.Clip [0].Right [c][5] * x2; // get pointer to end of line p += IPPU.Clip [0].Left [c][5] * x2; while (p < q) @@ -3445,8 +3466,10 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } } #else - // there is no clipping to worry about so just fill with the back colour - for (uint32 y = starty; y <= endy; y++) + /* there is no clipping to worry about so just fill with the back colour */ + uint32 y; + + for (y = starty; y <= endy; y++) { memset32((uint32_t*)(GFX.Screen + y * GFX_PITCH), back, IPPU.RenderedScreenWidth >> 1); @@ -3472,8 +3495,9 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } } #else - // Clear the Zbuffer for each of the lines which are going to be updated - for (uint32 y = starty; y <= endy; y++) + /* Clear the Zbuffer for each of the lines which are going to be updated */ + uint32 y; + for (y = starty; y <= endy; y++) { memset32((uint32_t*)(GFX.ZBuffer + y * GFX_ZPITCH), 0, IPPU.RenderedScreenWidth >> 2); @@ -3486,8 +3510,9 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } else // Transparencys are disabled, ahh lovely ... nice and easy. { + uint32 y; // get back colour to be used in clearing the screen - register uint32 back; + uint32 back; if (!(Memory.FillRAM [0x2131] & 0x80) && (Memory.FillRAM[0x2131] & 0x20) && (PPU.FixedColourRed || PPU.FixedColourGreen || PPU.FixedColourBlue)) { @@ -3511,7 +3536,7 @@ void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW()) } // now clear all graphics lines which are being updated using the back colour - for (register uint32 y = starty; y <= endy; y++) + for (y = starty; y <= endy; y++) { memset32((uint32_t*)(GFX.Screen + y * GFX_PITCH), back, IPPU.RenderedScreenWidth >> 1); @@ -3620,14 +3645,14 @@ else \ { if (IPPU.DoubleWidthPixels) { - register uint32 y; + uint32 y; // Mixure of background modes used on screen - scale width // of all non-mode 5 and 6 pixels. for (y = GFX.StartY; y <= GFX.EndY; y++) { - register int x; - register uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + 255; - register uint16* q = (uint16*)(GFX.Screen + y * GFX_PITCH) + 510; + int x; + uint16* p = (uint16*)(GFX.Screen + y * GFX_PITCH) + 255; + uint16* q = (uint16*)(GFX.Screen + y * GFX_PITCH) + 510; for (x = 255; x >= 0; x--, p--, q -= 2) * q = *(q + 1) = *p; @@ -119,11 +119,13 @@ void S9xFixColourBrightness() IPPU.XB = mul_brightness [PPU.Brightness]; if (Settings.SixteenBit) { - for (int i = 0; i < 256; i++) + unsigned i; + + for (i = 0; i < 256; i++) { - IPPU.Red [i] = IPPU.XB [PPU.CGDATA [i] & 0x1f]; - IPPU.Green [i] = IPPU.XB [(PPU.CGDATA [i] >> 5) & 0x1f]; - IPPU.Blue [i] = IPPU.XB [(PPU.CGDATA [i] >> 10) & 0x1f]; + IPPU.Red [i] = IPPU.XB [PPU.CGDATA [i] & 0x1f]; + IPPU.Green [i] = IPPU.XB [(PPU.CGDATA [i] >> 5) & 0x1f]; + IPPU.Blue [i] = IPPU.XB [(PPU.CGDATA [i] >> 10) & 0x1f]; IPPU.ScreenColors [i] = BUILD_PIXEL(IPPU.Red [i], IPPU.Green [i], IPPU.Blue [i]); } @@ -2411,7 +2413,7 @@ void ProcessSuperScope() } } -void S9xNextController() +void S9xNextController(void) { switch (IPPU.Controller) { @@ -2448,7 +2450,7 @@ void S9xNextController() } } -void S9xUpdateJoypads() +void S9xUpdateJoypads(void) { int i; @@ -2519,7 +2521,7 @@ void S9xUpdateJoypads() } } -void S9xSuperFXExec() +void S9xSuperFXExec(void) { if (Settings.SuperFX) { @@ -51,13 +51,13 @@ extern uint32 TailMask [5]; uint8 ConvertTile(uint8* pCache, uint32 TileAddr) { - register uint8* tp = &Memory.VRAM[TileAddr]; + uint8* tp = &Memory.VRAM[TileAddr]; uint32* p = (uint32*) pCache; uint32 non_zero = 0; uint8 line; uint32 p1; uint32 p2; - register uint8 pix; + uint8 pix; switch (BG.BitShift) { @@ -189,7 +189,7 @@ void SelectPalette() static INLINE void WRITE_4PIXELS(int32 Offset, uint8* Pixels) { - register uint8 Pixel; + uint8 Pixel; uint8* Screen = GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -209,7 +209,7 @@ static INLINE void WRITE_4PIXELS(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS_FLIPPED(int32 Offset, uint8* Pixels) { - register uint8 Pixel; + uint8 Pixel; uint8* Screen = GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -269,7 +269,7 @@ static inline void WRITE_4PIXELSHI16_FLIPPED(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELSx2(int32 Offset, uint8* Pixels) { - register uint8 Pixel; + uint8 Pixel; uint8* Screen = GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -289,7 +289,7 @@ static INLINE void WRITE_4PIXELSx2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS_FLIPPEDx2(int32 Offset, uint8* Pixels) { - register uint8 Pixel; + uint8 Pixel; uint8* Screen = GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -309,7 +309,7 @@ static INLINE void WRITE_4PIXELS_FLIPPEDx2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELSx2x2(int32 Offset, uint8* Pixels) { - register uint8 Pixel; + uint8 Pixel; uint8* Screen = GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -331,7 +331,7 @@ static INLINE void WRITE_4PIXELSx2x2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS_FLIPPEDx2x2(int32 Offset, uint8* Pixels) { - register uint8 Pixel; + uint8 Pixel; uint8* Screen = GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -356,7 +356,7 @@ void DrawTile(uint32 Tile, int32 Offset, uint32 StartLine, { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS, WRITE_4PIXELS_FLIPPED, 4) } @@ -366,7 +366,7 @@ void DrawClippedTile(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS, WRITE_4PIXELS_FLIPPED, 4) @@ -377,7 +377,7 @@ void DrawTilex2(uint32 Tile, int32 Offset, uint32 StartLine, { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELSx2, WRITE_4PIXELS_FLIPPEDx2, 8) } @@ -387,7 +387,7 @@ void DrawClippedTilex2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELSx2, WRITE_4PIXELS_FLIPPEDx2, 8) @@ -398,7 +398,7 @@ void DrawTilex2x2(uint32 Tile, int32 Offset, uint32 StartLine, { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELSx2x2, WRITE_4PIXELS_FLIPPEDx2x2, 8) } @@ -408,7 +408,7 @@ void DrawClippedTilex2x2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELSx2x2, WRITE_4PIXELS_FLIPPEDx2x2, 8) @@ -420,7 +420,7 @@ void DrawLargePixel(uint32 Tile, int32 Offset, { TILE_PREAMBLE - register uint8* sp = GFX.S + Offset; + uint8* sp = GFX.S + Offset; uint8* Depth = GFX.DB + Offset; uint8 pixel; #define PLOT_PIXEL(screen, pixel) (pixel) @@ -430,7 +430,7 @@ void DrawLargePixel(uint32 Tile, int32 Offset, static INLINE void WRITE_4PIXELS16(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -450,7 +450,7 @@ static INLINE void WRITE_4PIXELS16(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPED(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -470,7 +470,7 @@ static INLINE void WRITE_4PIXELS16_FLIPPED(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16x2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -490,7 +490,7 @@ static INLINE void WRITE_4PIXELS16x2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPEDx2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -510,7 +510,7 @@ static INLINE void WRITE_4PIXELS16_FLIPPEDx2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16x2x2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -532,7 +532,7 @@ static INLINE void WRITE_4PIXELS16x2x2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPEDx2x2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.DB + Offset; @@ -586,9 +586,9 @@ void DrawTile16(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) // GFX.ScreenColors = &GFX.ScreenColorsPre[(Tile & GFX.PaletteMask) >> GFX.PaletteShift]; - register uint32 l; + uint32 l; #endif - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4) } @@ -597,7 +597,7 @@ void DrawClippedTile16(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16, WRITE_4PIXELS16_FLIPPED, 4) @@ -607,7 +607,7 @@ void DrawTile16x2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8) } @@ -617,7 +617,7 @@ void DrawClippedTile16x2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2, WRITE_4PIXELS16_FLIPPEDx2, 8) @@ -627,7 +627,7 @@ void DrawTile16x2x2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8) } @@ -637,7 +637,7 @@ void DrawClippedTile16x2x2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16x2x2, WRITE_4PIXELS16_FLIPPEDx2x2, 8) @@ -649,7 +649,7 @@ void DrawLargePixel16(uint32 Tile, int32 Offset, { TILE_PREAMBLE - register uint16* sp = (uint16*) GFX.S + Offset; + uint16* sp = (uint16*) GFX.S + Offset; uint8* Depth = GFX.DB + Offset; uint16 pixel; @@ -658,7 +658,7 @@ void DrawLargePixel16(uint32 Tile, int32 Offset, static INLINE void WRITE_4PIXELS16_ADD(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -690,7 +690,7 @@ static INLINE void WRITE_4PIXELS16_ADD(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPED_ADD(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -722,7 +722,7 @@ static INLINE void WRITE_4PIXELS16_FLIPPED_ADD(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_ADD1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -754,7 +754,7 @@ static INLINE void WRITE_4PIXELS16_ADD1_2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPED_ADD1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -786,7 +786,7 @@ static INLINE void WRITE_4PIXELS16_FLIPPED_ADD1_2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_SUB(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -818,7 +818,7 @@ static INLINE void WRITE_4PIXELS16_SUB(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPED_SUB(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -850,7 +850,7 @@ static INLINE void WRITE_4PIXELS16_FLIPPED_SUB(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_SUB1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -882,7 +882,7 @@ static INLINE void WRITE_4PIXELS16_SUB1_2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPED_SUB1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -917,7 +917,7 @@ void DrawTile16Add(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16_ADD, WRITE_4PIXELS16_FLIPPED_ADD, 4) } @@ -927,7 +927,7 @@ void DrawClippedTile16Add(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD, WRITE_4PIXELS16_FLIPPED_ADD, 4) @@ -937,7 +937,7 @@ void DrawTile16Add1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4) } @@ -947,7 +947,7 @@ void DrawClippedTile16Add1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADD1_2, WRITE_4PIXELS16_FLIPPED_ADD1_2, 4) @@ -957,7 +957,7 @@ void DrawTile16Sub(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4) } @@ -967,7 +967,7 @@ void DrawClippedTile16Sub(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB, WRITE_4PIXELS16_FLIPPED_SUB, 4) @@ -977,7 +977,7 @@ void DrawTile16Sub1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4) } @@ -987,7 +987,7 @@ void DrawClippedTile16Sub1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUB1_2, WRITE_4PIXELS16_FLIPPED_SUB1_2, 4) @@ -995,7 +995,7 @@ void DrawClippedTile16Sub1_2(uint32 Tile, int32 Offset, static INLINE void WRITE_4PIXELS16_ADDF1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -1021,7 +1021,7 @@ static INLINE void WRITE_4PIXELS16_ADDF1_2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPED_ADDF1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -1047,7 +1047,7 @@ static INLINE void WRITE_4PIXELS16_FLIPPED_ADDF1_2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_SUBF1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -1073,7 +1073,7 @@ static INLINE void WRITE_4PIXELS16_SUBF1_2(int32 Offset, uint8* Pixels) static INLINE void WRITE_4PIXELS16_FLIPPED_SUBF1_2(int32 Offset, uint8* Pixels) { - register uint32 Pixel; + uint32 Pixel; uint16* Screen = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint8* SubDepth = GFX.SubZBuffer + Offset; @@ -1101,7 +1101,7 @@ void DrawTile16FixedAdd1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16_ADDF1_2, WRITE_4PIXELS16_FLIPPED_ADDF1_2, 4) } @@ -1111,7 +1111,7 @@ void DrawClippedTile16FixedAdd1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16_ADDF1_2, @@ -1122,7 +1122,7 @@ void DrawTile16FixedSub1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILE(WRITE_4PIXELS16_SUBF1_2, WRITE_4PIXELS16_FLIPPED_SUBF1_2, 4) } @@ -1132,7 +1132,7 @@ void DrawClippedTile16FixedSub1_2(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILE(WRITE_4PIXELS16_SUBF1_2, @@ -1145,9 +1145,9 @@ void DrawLargePixel16Add(uint32 Tile, int32 Offset, { TILE_PREAMBLE - register uint16* sp = (uint16*) GFX.S + Offset; + uint16* sp = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; - register uint16 pixel; + uint16 pixel; #define LARGE_ADD_PIXEL(s, p) \ (Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \ @@ -1164,9 +1164,9 @@ void DrawLargePixel16Add1_2(uint32 Tile, int32 Offset, { TILE_PREAMBLE - register uint16* sp = (uint16*) GFX.S + Offset; + uint16* sp = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; - register uint16 pixel; + uint16 pixel; #define LARGE_ADD_PIXEL1_2(s, p) \ ((uint16) (Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \ @@ -1183,9 +1183,9 @@ void DrawLargePixel16Sub(uint32 Tile, int32 Offset, { TILE_PREAMBLE - register uint16* sp = (uint16*) GFX.S + Offset; + uint16* sp = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; - register uint16 pixel; + uint16 pixel; #define LARGE_SUB_PIXEL(s, p) \ (Depth [z + GFX.DepthDelta] ? (Depth [z + GFX.DepthDelta] != 1 ? \ @@ -1202,7 +1202,7 @@ void DrawLargePixel16Sub1_2(uint32 Tile, int32 Offset, { TILE_PREAMBLE - register uint16* sp = (uint16*) GFX.S + Offset; + uint16* sp = (uint16*) GFX.S + Offset; uint8* Depth = GFX.ZBuffer + Offset; uint16 pixel; @@ -1219,7 +1219,7 @@ void DrawHiResTile16(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; RENDER_TILEHI(WRITE_4PIXELSHI16, WRITE_4PIXELSHI16_FLIPPED, 4) } @@ -1229,7 +1229,7 @@ void DrawHiResClippedTile16(uint32 Tile, int32 Offset, uint32 StartLine, uint32 LineCount) { TILE_PREAMBLE - register uint8* bp; + uint8* bp; TILE_CLIP_PREAMBLE RENDER_CLIPPED_TILEHI(WRITE_4PIXELSHI16, WRITE_4PIXELSHI16_FLIPPED, 4) |