summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-11-26 17:47:47 +0000
committer Michaël Banaan Ananas <happppp@users.noreply.github.com>2011-11-26 17:47:47 +0000
commitda5b02771ee41c4b058a7be75663aa72b15aaeb0 (patch)
treece764717fbe80a6d86d439d41649171e59d488ec
parentfdca5aa2e2a99c167cc0636f7e3904c05c4cb797 (diff)
digdug: fixed cocktail offset
-rw-r--r--src/mame/video/digdug.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/src/mame/video/digdug.c b/src/mame/video/digdug.c
index 521ab182c22..dbac11f9b33 100644
--- a/src/mame/video/digdug.c
+++ b/src/mame/video/digdug.c
@@ -240,12 +240,6 @@ WRITE8_HANDLER( digdug_PORT_w )
***************************************************************************/
-static const rectangle spritevisiblearea =
-{
- 2*8, 34*8-1,
- 0*8, 28*8-1
-};
-
static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const rectangle *cliprect )
{
digdug_state *state = machine.driver_data<digdug_state>();
@@ -254,6 +248,13 @@ static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const recta
UINT8 *spriteram_3 = state->m_digdug_flpram + 0x380;
int offs;
+ rectangle visarea = {2*8, 34*8-1, 0*8, 28*8-1};
+ if (flip_screen_get(machine))
+ {
+ visarea.min_x += 96;
+ visarea.max_x += 96;
+ }
+
for (offs = 0;offs < 0x80;offs += 2)
{
static const int gfx_offs[2][2] =
@@ -280,7 +281,8 @@ static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const recta
{
flipx ^= 1;
flipy ^= 1;
- sy += 48;
+ sy += 40;
+ sx += 96;
}
for (y = 0;y <= size;y++)
@@ -288,13 +290,13 @@ static void draw_sprites(running_machine& machine, bitmap_t *bitmap, const recta
for (x = 0;x <= size;x++)
{
UINT32 transmask = colortable_get_transpen_mask(machine.colortable, machine.gfx[1], color, 0x1f);
- drawgfx_transmask(bitmap,&spritevisiblearea,machine.gfx[1],
+ drawgfx_transmask(bitmap,&visarea,machine.gfx[1],
sprite + gfx_offs[y ^ (size * flipy)][x ^ (size * flipx)],
color,
flipx,flipy,
((sx + 16*x) & 0xff), sy + 16*y,transmask);
/* wraparound */
- drawgfx_transmask(bitmap,&spritevisiblearea,machine.gfx[1],
+ drawgfx_transmask(bitmap,&visarea,machine.gfx[1],
sprite + gfx_offs[y ^ (size * flipy)][x ^ (size * flipx)],
color,
flipx,flipy,