diff options
| author | XaviDCR92 <xavi.dcr@gmail.com> | 2017-07-24 22:39:16 +0200 |
|---|---|---|
| committer | XaviDCR92 <xavi.dcr@gmail.com> | 2017-07-24 22:39:16 +0200 |
| commit | f071adf8f590bb2d2ceee7d93bea120c9d754788 (patch) | |
| tree | e5cd62882fed370bc2d0f75ca6f10fe4b65d5940 /Source/Gfx.c | |
| parent | 41d8caba3b3e7611d657c0ee4cecd1cdbdf0c814 (diff) | |
| download | opensend-f071adf8f590bb2d2ceee7d93bea120c9d754788.tar.gz | |
* Some improvements made to improve peformance and stability.
- Removed Pad module (useless).
* Some functions removed from System and Gfx.
Diffstat (limited to 'Source/Gfx.c')
| -rw-r--r-- | Source/Gfx.c | 47 |
1 files changed, 2 insertions, 45 deletions
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) ) |
