summaryrefslogtreecommitdiff
path: root/src/gfx.c
diff options
context:
space:
mode:
authortwinaphex2015-11-14 04:32:05 +0100
committertwinaphex2015-11-14 04:32:05 +0100
commit3200822d8d3af1a0e92109f844d01f5717db280d (patch)
tree1ae73ef9c4f63158b309c62cf6c1a82e8d444f88 /src/gfx.c
parenteb264e5b4d35b2003e83af579f68c69f8035d3ed (diff)
downloadsnes9x2002-3200822d8d3af1a0e92109f844d01f5717db280d.tar.gz
snes9x2002-3200822d8d3af1a0e92109f844d01f5717db280d.tar.bz2
snes9x2002-3200822d8d3af1a0e92109f844d01f5717db280d.zip
Cut down on some warnings and unnecessary functions
Diffstat (limited to 'src/gfx.c')
-rw-r--r--src/gfx.c57
1 files changed, 1 insertions, 56 deletions
diff --git a/src/gfx.c b/src/gfx.c
index a81ce90..caa5dfb 100644
--- a/src/gfx.c
+++ b/src/gfx.c
@@ -94,8 +94,6 @@ const int tx_table[16] =
#define M8 19
void ComputeClipWindows();
-static void S9xDisplayFrameRate();
-static void S9xDisplayString(const char* string);
extern uint8 BitShifts[8][4];
extern uint8 TileShifts[8][4];
@@ -1493,19 +1491,10 @@ void DrawBackgroundMode5(uint32 BGMODE, uint32 bg, uint8 Z1, uint8 Z2)
if (((uint8*)SC3 - Memory.VRAM) >= 0x10000)
SC3 -= 0x08000;
int Lines;
- int VOffsetMask;
- int VOffsetShift;
+ int VOffsetShift = 3;
if (BG.TileSize == 16)
- {
- VOffsetMask = 0x3ff;
VOffsetShift = 4;
- }
- else
- {
- VOffsetMask = 0x1ff;
- VOffsetShift = 3;
- }
int endy = GFX.EndY;
for (int Y = GFX.StartY; Y <= endy; Y += Lines)
@@ -2857,50 +2846,6 @@ void DisplayChar(uint8* Screen, uint8 c)
}
}
-static void S9xDisplayFrameRate()
-{
- uint8* Screen = GFX.Screen + 2 +
- (IPPU.RenderedScreenHeight - font_height - 1) * GFX_PITCH;
- char string [10];
- int len = 5;
-
- sprintf(string, "%02d/%02d", IPPU.DisplayedRenderedFrameCount,
- (int) Memory.ROMFramesPerSecond);
-
- int i;
- for (i = 0; i < len; i++)
- {
- DisplayChar(Screen, string [i]);
- Screen += (font_width - 1) * sizeof(uint16);
- }
-}
-
-static void S9xDisplayString(const char* string)
-{
- uint8* Screen = GFX.Screen + 2 +
- (IPPU.RenderedScreenHeight - font_height * 5) * GFX_PITCH;
- int len = strlen(string);
- int max_chars = IPPU.RenderedScreenWidth / (font_width - 1);
- int char_count = 0;
- int i;
-
- for (i = 0; i < len; i++, char_count++)
- {
- if (char_count >= max_chars || string [i] < 32)
- {
- Screen -= (font_width - 1) * sizeof(uint16) * max_chars;
- Screen += font_height * GFX_PITCH;
- if (Screen >= GFX.Screen + GFX_PITCH * IPPU.RenderedScreenHeight)
- break;
- char_count -= max_chars;
- }
- if (string [i] < 32)
- continue;
- DisplayChar(Screen, string [i]);
- Screen += (font_width - 1) * sizeof(uint16);
- }
-}
-
void S9xUpdateScreen() // ~30-50ms! (called from FLUSH_REDRAW())
{
int32 x2 = 1;