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.
This commit is contained in:
squall-leonhart 2012-08-19 21:22:16 +00:00
parent 41d22899e3
commit 7944d44390
3 changed files with 4 additions and 32 deletions

View File

@ -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;

View File

@ -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;

View File

@ -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;
}
}
}