Modernization of drivers part 16 (no whatsnew)

This commit is contained in:
Miodrag Milanovic 2013-02-12 10:06:05 +00:00
parent 9cada7c97e
commit 4a8e6794a0
5 changed files with 19 additions and 14 deletions

View File

@ -1195,7 +1195,7 @@ static const UINT8 xor2_table[] =
99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,99,11, 6,99,
};
static int kram3_permut1(int idx, int value)
int qix_state::kram3_permut1(int idx, int value)
{
switch (idx)
{
@ -1207,7 +1207,7 @@ static int kram3_permut1(int idx, int value)
}
}
static int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table)
int qix_state::kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table)
{
int xorval = 0;
@ -1228,7 +1228,7 @@ static int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table)
return xorval;
}
static int kram3_decrypt(int address, int value)
int qix_state::kram3_decrypt(int address, int value)
{
int indx1 = (BIT(address,1) << 1) | BIT(address,5);
int indx2 = (BIT(address,7) << 1) | BIT(address,3);

View File

@ -124,6 +124,10 @@ public:
DECLARE_WRITE8_MEMBER(slither_coinctl_w);
DECLARE_WRITE_LINE_MEMBER(qix_pia_dint);
DECLARE_WRITE_LINE_MEMBER(qix_pia_sint);
void get_pens(pen_t *pens);
int kram3_permut1(int idx, int value);
int kram3_permut2(int tbl_index, int idx, const UINT8 *xor_table);
int kram3_decrypt(int address, int value);
};

View File

@ -25,4 +25,5 @@ public:
TILE_GET_INFO_MEMBER(get_fg_tile_info);
virtual void video_start();
UINT32 screen_update_quizdna(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
};

View File

@ -225,7 +225,7 @@ WRITE8_MEMBER(qix_state::qix_palettebank_w)
}
static void get_pens(qix_state *state, pen_t *pens)
void qix_state::get_pens( pen_t *pens)
{
offs_t offs;
@ -252,11 +252,11 @@ static void get_pens(qix_state *state, pen_t *pens)
0xff /* value = 3, intensity = 3 */
};
for (offs = state->m_palette_bank << 8; offs < (state->m_palette_bank << 8) + NUM_PENS; offs++)
for (offs = m_palette_bank << 8; offs < (m_palette_bank << 8) + NUM_PENS; offs++)
{
int bits, intensity, r, g, b;
UINT8 data = state->m_paletteram[offs];
UINT8 data = m_paletteram[offs];
/* compute R, G, B from the table */
intensity = (data >> 0) & 0x03;
@ -291,7 +291,7 @@ static MC6845_BEGIN_UPDATE( begin_update )
#endif
/* create the pens */
get_pens(state, state->m_pens);
state->get_pens(state->m_pens);
return state->m_pens;
}

View File

@ -130,13 +130,13 @@ WRITE8_MEMBER(quizdna_state::paletteram_xBGR_RRRR_GGGG_BBBB_w)
palette_set_color_rgb(machine(),offs/2,pal5bit(r),pal5bit(g),pal5bit(b));
}
static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect)
void quizdna_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
{
quizdna_state *state = machine.driver_data<quizdna_state>();
UINT8 *spriteram = state->m_spriteram;
//OBRISI.ME
UINT8 *spriteram = m_spriteram;
int offs;
for (offs = 0; offs<state->m_spriteram.bytes(); offs+=8)
for (offs = 0; offs<m_spriteram.bytes(); offs+=8)
{
int i;
@ -150,7 +150,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
int dy = 0x10;
col &= 0x1f;
if (state->m_flipscreen)
if (m_flipscreen)
{
x -= 7;
y += 1;
@ -173,7 +173,7 @@ static void draw_sprites(running_machine &machine, bitmap_ind16 &bitmap, const r
{
y &= 0x1ff;
drawgfx_transpen(bitmap,cliprect,machine.gfx[2],
drawgfx_transpen(bitmap,cliprect,machine().gfx[2],
code ^ i,
col,
fx,fy,
@ -189,7 +189,7 @@ UINT32 quizdna_state::screen_update_quizdna(screen_device &screen, bitmap_ind16
if (m_video_enable)
{
m_bg_tilemap->draw(bitmap, cliprect, 0, 0);
draw_sprites(machine(), bitmap, cliprect);
draw_sprites(bitmap, cliprect);
m_fg_tilemap->draw(bitmap, cliprect, 0, 0);
}
else