diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2009-05-13 21:41:55 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2009-05-13 21:41:55 +0000 |
commit | 8226d123f8cd98d961a01d28dbca3c3820e57e74 (patch) | |
tree | f48a174a2b305258f3f512989a0e15fdeb197b58 | |
parent | e7e544c0c16694e6c500b60ead4a224b3f17dd67 (diff) |
Fixed King Derby sprites wrap-around and flip x positioning.
-rw-r--r-- | src/mame/drivers/kingdrby.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/mame/drivers/kingdrby.c b/src/mame/drivers/kingdrby.c index 308641641a9..fd873f41445 100644 --- a/src/mame/drivers/kingdrby.c +++ b/src/mame/drivers/kingdrby.c @@ -141,9 +141,6 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { int x,y,spr_offs,colour,fx,dx,dy,h,w,mode; - if((spriteram[count+3] & 1) == 1) - continue; - spr_offs = (spriteram[count]); spr_offs &=0x7f; mode = spr_offs; @@ -154,10 +151,10 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta y = 0; else y = 0x100-spriteram[count+1]; - x = spriteram[count+2]; + x = spriteram[count+2] - ((spriteram[count+3] & 1)<<8); /*TODO: I really believe that this is actually driven by a prom.*/ - if((mode >= 0x168/4) && (mode <= 0x17f/4)) { h = 1; w = 1; } + if((mode >= 0x168/4) && (mode <= 0x17f/4)) { h = 1; w = 1; } else if((mode >= 0x18c/4) && (mode <= 0x18f/4)) { h = 1; w = 1; } else if((mode >= 0x19c/4) && (mode <= 0x19f/4)) { h = 1; w = 1; } else if((mode & 3) == 3 || (mode) >= 0x13c/4) { h = 2; w = 2; } @@ -167,13 +164,13 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { for(dy=0;dy<h;dy++) for(dx=0;dx<w;dx++) - drawgfx(bitmap,machine->gfx[0],spr_offs++,colour,1,0,(x+16*w)-dx*16,y+dy*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx(bitmap,machine->gfx[0],spr_offs++,colour,1,0,((x+16*w)-(dx+1)*16),(y+dy*16),cliprect,TRANSPARENCY_PEN,0); } else { for(dy=0;dy<h;dy++) for(dx=0;dx<w;dx++) - drawgfx(bitmap,machine->gfx[0],spr_offs++,colour,0,0,(x+dx*16),y+dy*16,cliprect,TRANSPARENCY_PEN,0); + drawgfx(bitmap,machine->gfx[0],spr_offs++,colour,0,0,(x+dx*16),(y+dy*16),cliprect,TRANSPARENCY_PEN,0); } } } |