From 81f78a6c1bfddc3988dd95bd688d43685e944876 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C3=ABl=20Banaan=20Ananas?= Date: Sat, 26 Nov 2011 17:11:29 +0000 Subject: [PATCH] galaga: fixed cocktail offset --- src/mame/video/galaga.c | 18 ++++++++---------- src/mame/video/mappy.c | 8 ++++---- 2 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/mame/video/galaga.c b/src/mame/video/galaga.c index c882d487485..8010dfb0a5f 100644 --- a/src/mame/video/galaga.c +++ b/src/mame/video/galaga.c @@ -510,7 +510,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 <= sizey;y++) @@ -535,28 +536,26 @@ static void draw_stars(running_machine &machine, bitmap_t *bitmap, const rectang /* draw the stars */ /* $a005 controls the stars ON/OFF */ - - if ( (state->m_galaga_starcontrol[5] & 1) == 1 ) { + int y_align = 112; /* 112 is a tweak to get alignment about perfect */ + int x_align = flip_screen_get(machine) ? 112 : 16; + int star_cntr; int set_a, set_b; /* two sets of stars controlled by these bits */ - set_a = (state->m_galaga_starcontrol[3] & 1); set_b = (state->m_galaga_starcontrol[4] & 1) | 0x2; - for (star_cntr = 0;star_cntr < MAX_STARS ;star_cntr++) { int x,y; - if ( (set_a == star_seed_tab[star_cntr].set) || ( set_b == star_seed_tab[star_cntr].set) ) + if ( (set_a == star_seed_tab[star_cntr].set) || ( set_b == star_seed_tab[star_cntr].set) ) { - x = (star_seed_tab[star_cntr].x + state->m_stars_scrollx) % 256 + 16; - y = (112 + star_seed_tab[star_cntr].y + state->m_stars_scrolly) % 256; - /* 112 is a tweak to get alignment about perfect */ + x = (star_seed_tab[star_cntr].x + state->m_stars_scrollx) % 256 + x_align; + y = (y_align + star_seed_tab[star_cntr].y + state->m_stars_scrolly) % 256; if (y >= cliprect->min_y && y <= cliprect->max_y) *BITMAP_ADDR16(bitmap, y, x) = STARS_COLOR_BASE + star_seed_tab[ star_cntr ].col; @@ -586,7 +585,6 @@ SCREEN_EOF( galaga ) int s0,s1,s2; static const int speeds[8] = { -1, -2, -3, 0, 3, 2, 1, 0 }; - s0 = (state->m_galaga_starcontrol[0] & 1); s1 = (state->m_galaga_starcontrol[1] & 1); s2 = (state->m_galaga_starcontrol[2] & 1); diff --git a/src/mame/video/mappy.c b/src/mame/video/mappy.c index 403439719cf..628a46a3f41 100644 --- a/src/mame/video/mappy.c +++ b/src/mame/video/mappy.c @@ -437,8 +437,8 @@ static void mappy_draw_sprites(running_machine &machine, bitmap_t *bitmap, const { flipx ^= 1; flipy ^= 1; - sy += (264 - 224); - sx += (384 - 288); + sy += 40; + sx += 96; } for (y = 0;y <= sizey;y++) @@ -516,8 +516,8 @@ static void phozon_draw_sprites(running_machine &machine, bitmap_t *bitmap, cons { flipx ^= 1; flipy ^= 1; - sy += (264 - 224); - sx += (384 - 288); + sy += 40; + sx += 96; } for (y = 0;y <= sizey;y++)