From f071adf8f590bb2d2ceee7d93bea120c9d754788 Mon Sep 17 00:00:00 2001 From: XaviDCR92 Date: Mon, 24 Jul 2017 22:39:16 +0200 Subject: * Some improvements made to improve peformance and stability. - Removed Pad module (useless). * Some functions removed from System and Gfx. --- Source/Gfx.c | 47 ++--------------------------------------------- 1 file changed, 2 insertions(+), 45 deletions(-) (limited to 'Source/Gfx.c') diff --git a/Source/Gfx.c b/Source/Gfx.c index 03b33d2..b9ffb63 100644 --- a/Source/Gfx.c +++ b/Source/Gfx.c @@ -99,9 +99,6 @@ static uint8_t global_lum; // information for development purposes. static bool GfxDevMenuEnableFlag; -static bool five_hundred_ms_show; -static bool one_second_show; - void GfxSwapBuffers(void) { // Consistency check @@ -181,17 +178,7 @@ void GfxSetPrimitiveList(void) } void GfxDrawScene_Fast(void) -{ - if(System1SecondTick() == true) - { - one_second_show = one_second_show? false:true; - } - - if(System500msTick() == true) - { - five_hundred_ms_show = five_hundred_ms_show? false:true; - } - +{ GfxSwapBuffers(); FontCyclic(); GsDrawList(); @@ -227,8 +214,6 @@ void GfxSortSprite(GsSprite * spr) unsigned char aux_tpage = spr->tpage; short aux_w = spr->w; short aux_x = spr->x; - bool has_1hz_flash = spr->attribute & GFX_1HZ_FLASH; - bool has_2hz_flash = spr->attribute & GFX_2HZ_FLASH; if( (spr->w <= 0) || (spr->h <= 0) ) { @@ -240,14 +225,6 @@ void GfxSortSprite(GsSprite * spr) { return; } - else if(has_2hz_flash && Gfx2HzFlash() == false) - { - return; - } - else if(has_1hz_flash && Gfx1HzFlash() == false) - { - return; - } if(global_lum != NORMAL_LUMINANCE) { @@ -278,12 +255,7 @@ void GfxSortSprite(GsSprite * spr) spr->b -= NORMAL_LUMINANCE - global_lum; } } - - if(has_1hz_flash == true) - { - spr->attribute &= ~(GFX_1HZ_FLASH); - } - + if(spr->w > MAX_SIZE_FOR_GSSPRITE) { // GsSprites can't be bigger than 256x256, so since display @@ -307,11 +279,6 @@ void GfxSortSprite(GsSprite * spr) GsSortSprite(spr); } - if(has_1hz_flash == true) - { - spr->attribute |= GFX_1HZ_FLASH; - } - spr->r = aux_r; spr->g = aux_g; spr->b = aux_b; @@ -559,16 +526,6 @@ void GfxSaveDisplayData(GsSprite *spr) while(GfxIsGPUBusy() == true); } -bool Gfx1HzFlash(void) -{ - return one_second_show; -} - -bool Gfx2HzFlash(void) -{ - return five_hundred_ms_show; -} - bool GfxTPageOffsetFromVRAMPosition(GsSprite * spr, short x, short y) { if( (x >= VRAM_W) || (x < 0) || (y >= VRAM_H) || (y < 0) ) -- cgit v1.2.3