diff options
author | Angelo Salese <angelosa@users.noreply.github.com> | 2009-06-07 14:28:58 +0000 |
---|---|---|
committer | Angelo Salese <angelosa@users.noreply.github.com> | 2009-06-07 14:28:58 +0000 |
commit | eb9250c869592a68d711b8d1f321806a6edbf61c (patch) | |
tree | ff858d5f43c14b89d1efb99a0a667649405e95af | |
parent | 4e67a0a58934f0c52a2ef1f7eac3f84cdb0cc34c (diff) |
Fixed sprite offsets and tilemap window priority.
-rw-r--r-- | src/mame/drivers/mirax.c | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/src/mame/drivers/mirax.c b/src/mame/drivers/mirax.c index 3a37b02f8fe..e5709d17e6f 100644 --- a/src/mame/drivers/mirax.c +++ b/src/mame/drivers/mirax.c @@ -8,9 +8,9 @@ Angelo Salese Olivier Galibert TODO: +- emulate sound properly; - sprite offsets? - score / credits display should stay above the sprites? -- emulate sound properly; ==================================================== @@ -89,7 +89,7 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const recta { int spr_offs,x,y,color,fx,fy; - if(spriteram[count] == 0x00 && spriteram[count+3] == 0x00) + if(spriteram[count] == 0x00 || spriteram[count+3] == 0x00) continue; spr_offs = (spriteram[count+1] & 0x3f); @@ -132,6 +132,29 @@ static VIDEO_UPDATE(mirax) draw_sprites(screen->machine,bitmap,cliprect); + count = 0x00000; + + /* draw score and credit displays above the sprites */ + for (y=0;y<32;y++) + { + for (x=0;x<32;x++) + { + int tile = videoram[count]; + int color = (colorram[x*2]<<8) | (colorram[(x*2)+1]); + int x_scroll = (color & 0xff00)>>8; + tile |= ((color & 0xe0)<<3); + + if(x <= 1 || x >= 30) + { + drawgfx(bitmap,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll,cliprect,TRANSPARENCY_NONE,0); + /* wrap-around */ + drawgfx(bitmap,gfx,tile,color & 7,0,0,(x*8),(y*8)-x_scroll+256,cliprect,TRANSPARENCY_NONE,0); + } + + count++; + } + } + return 0; } @@ -431,4 +454,4 @@ static DRIVER_INIT( mirax ) } -GAME( 1985, mirax, 0, mirax, mirax, mirax, ROT90, "Current Technologies", "Mirax", GAME_IMPERFECT_SOUND | GAME_IMPERFECT_GRAPHICS ) +GAME( 1985, mirax, 0, mirax, mirax, mirax, ROT90, "Current Technologies", "Mirax", GAME_IMPERFECT_SOUND ) |