Fix for the graphical glitches on the volcano level in Caveman Ninja

This commit is contained in:
dinkc64 2014-05-05 06:52:59 +00:00
parent abec26afd7
commit 8e0a5e6cb4
3 changed files with 10 additions and 1 deletions

View File

@ -1185,6 +1185,8 @@ static INT32 CninjaInit()
deco16SoundInit(DrvHucROM, DrvHucRAM, 8055000, 1, DrvYM2151WritePort, 0.45, 1006875, 0.75, 2013750, 0.60);
BurnYM2203SetAllRoutes(0, 0.60, BURN_SND_ROUTE_BOTH);
deco16ic_cninja_scrolly = 1;
GenericTilesInit();
DrvDoReset();
@ -1751,6 +1753,7 @@ static INT32 DrvExit()
BurnFree (AllMem);
MSM6295ROM = NULL;
deco16ic_cninja_scrolly = 0;
return 0;
}

View File

@ -53,6 +53,7 @@ UINT8 *deco16_prio_map;
UINT8 *deco16_sprite_prio_map; // boogwing
INT32 deco16_vblank;
UINT16 deco16ic_cninja_scrolly = 0; // use different indexing of scroll_y for Caveman Ninja
void deco16ProtScan();
void deco16ProtReset();
@ -270,7 +271,11 @@ void deco16_draw_layer(INT32 tmap, UINT16 *dest, INT32 flags)
for (INT32 x = 0; x < nScreenWidth + size; x+=size)
{
INT32 yoff = deco16_scroll_y[tmap][x] & hmask;
INT32 yoff;
if (deco16ic_cninja_scrolly)
yoff = deco16_scroll_y[tmap][x + deco16_scroll_x[tmap][y]] & hmask;
else
yoff = deco16_scroll_y[tmap][x] & hmask;
INT32 yy = (y + yoff) & hmask;
INT32 xx = (x + xoff) & wmask;

View File

@ -6,6 +6,7 @@ extern UINT8 *deco16_pf_ram[4];
extern UINT8 *deco16_pf_rowscroll[4];
extern UINT16 deco16_priority;
extern UINT16 deco16ic_cninja_scrolly; // use different indexing of scroll_y for Caveman Ninja
void deco16_set_bank_callback(INT32 tmap, INT32 (*callback)(const INT32 bank));
void deco16_set_color_base(INT32 tmap, INT32 base);