From c8d6432cb757a82fd34e8bf6bc646a00401cb476 Mon Sep 17 00:00:00 2001 From: squall-leonhart Date: Sun, 19 Aug 2012 21:22:16 +0000 Subject: [PATCH] removing some cases where then and else do exactly the same thing i could not see any functional differences anywhere, but there might be something im overlooking. git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1111 a31d4220-a93d-0410-bf67-fe4944624d44 --- src/gb/gbGfx.cpp | 9 ++------- src/win32/GBOamView.cpp | 9 ++------- src/win32/MapView.cpp | 18 ------------------ 3 files changed, 4 insertions(+), 32 deletions(-) diff --git a/src/gb/gbGfx.cpp b/src/gb/gbGfx.cpp index cf97800f..37e40976 100644 --- a/src/gb/gbGfx.cpp +++ b/src/gb/gbGfx.cpp @@ -409,13 +409,8 @@ void gbDrawSpriteTile(int tile, int x,int y,int t, int flags, u8 * bank0; u8 * bank1; if(gbCgbMode) { - if(register_VBK & 1) { - bank0 = &gbVram[0x0000]; - bank1 = &gbVram[0x2000]; - } else { - bank0 = &gbVram[0x0000]; - bank1 = &gbVram[0x2000]; - } + bank0 = &gbVram[0x0000]; + bank1 = &gbVram[0x2000]; } else { bank0 = &gbMemory[0x8000]; bank1 = NULL; diff --git a/src/win32/GBOamView.cpp b/src/win32/GBOamView.cpp index 537a7823..d2b07af3 100644 --- a/src/win32/GBOamView.cpp +++ b/src/win32/GBOamView.cpp @@ -168,13 +168,8 @@ void GBOamView::render() u8 * bank0; u8 * bank1; if(gbCgbMode) { - if(register_VBK & 1) { - bank0 = &gbVram[0x0000]; - bank1 = &gbVram[0x2000]; - } else { - bank0 = &gbVram[0x0000]; - bank1 = &gbVram[0x2000]; - } + bank0 = &gbVram[0x0000]; + bank1 = &gbVram[0x2000]; } else { bank0 = &gbMemory[0x8000]; bank1 = NULL; diff --git a/src/win32/MapView.cpp b/src/win32/MapView.cpp index 1b6cb83f..dd14c4c5 100644 --- a/src/win32/MapView.cpp +++ b/src/win32/MapView.cpp @@ -279,7 +279,6 @@ void MapView::renderRotScreen(u16 control) w = sizeX; h = sizeY; - if(control & 0x80) { for(int y = 0; y < sizeY; y++) { for(int x = 0; x < sizeX; x++) { int tile = screenBase[(x>>3) + (y>>3)*(w>>3)]; @@ -293,23 +292,6 @@ void MapView::renderRotScreen(u16 control) *bmp++ = ((color2 >> 10) & 0x1f) << 3; *bmp++ = ((color2 >> 5) & 0x1f) << 3; *bmp++ = (color2 & 0x1f) << 3; - } - } - } else { - for(int y = 0; y < sizeY; y++) { - for(int x = 0; x < sizeX; x++) { - int tile = screenBase[(x>>3) + (y>>3)*(w>>3)]; - - int tileX = (x & 7); - int tileY = y & 7; - - u8 color = charBase[tile * 64 + tileY * 8 + tileX]; - u16 color2 = palette[color]; - - *bmp++ = ((color2 >> 10) & 0x1f) << 3; - *bmp++ = ((color2 >> 5) & 0x1f) << 3; - *bmp++ = (color2 & 0x1f) << 3; - } } }