diff options
author | Ivan Vangelista <mesgnet@yahoo.it> | 2014-10-07 16:55:09 +0000 |
---|---|---|
committer | Ivan Vangelista <mesgnet@yahoo.it> | 2014-10-07 16:55:09 +0000 |
commit | 633a456c1de8cb8affc12d6acf4fc6020d744435 (patch) | |
tree | e9376e1ef8bb77bd9218d36bd68eafd2023bc313 /src/mame/video/cps1.c | |
parent | 4cf62f82b61f36edbbc568432c3f17b739bbd656 (diff) |
Misc cleanups of the day (nw)
Diffstat (limited to 'src/mame/video/cps1.c')
-rw-r--r-- | src/mame/video/cps1.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/mame/video/cps1.c b/src/mame/video/cps1.c index be8f485a7de..eb8dd0b928f 100644 --- a/src/mame/video/cps1.c +++ b/src/mame/video/cps1.c @@ -1684,10 +1684,9 @@ MACHINE_RESET_MEMBER(cps_state,cps) } -INLINE UINT16 *cps1_base( running_machine &machine, int offset, int boundary ) +inline UINT16 *cps_state::cps1_base( int offset, int boundary ) { - cps_state *state = machine.driver_data<cps_state>(); - int base = state->m_cps_a_regs[offset] * 256; + int base = m_cps_a_regs[offset] * 256; /* The scroll RAM must start on a 0x4000 boundary. @@ -1698,7 +1697,7 @@ INLINE UINT16 *cps1_base( running_machine &machine, int offset, int boundary ) Mask out the irrelevant bits. */ base &= ~(boundary - 1); - return &state->m_gfxram[(base & 0x3ffff) / 2]; + return &m_gfxram[(base & 0x3ffff) / 2]; } @@ -1716,7 +1715,7 @@ WRITE16_MEMBER(cps_state::cps1_cps_a_w) fixes glitches in the ghouls intro, but it might happen at next vblank. */ if (offset == CPS1_PALETTE_BASE) - cps1_build_palette(cps1_base(machine(), CPS1_PALETTE_BASE, m_palette_align)); + cps1_build_palette(cps1_base(CPS1_PALETTE_BASE, m_palette_align)); // pzloop2 write to register 24 on startup. This is probably just a bug. if (offset == 0x24 / 2 && m_cps_version == 2) @@ -1902,19 +1901,19 @@ void cps_state::cps1_get_video_base() int layercontrol=0, videocontrol=0, scroll1xoff=0, scroll2xoff=0, scroll3xoff=0; /* Re-calculate the VIDEO RAM base */ - if (m_scroll1 != cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size)) + if (m_scroll1 != cps1_base(CPS1_SCROLL1_BASE, m_scroll_size)) { - m_scroll1 = cps1_base(machine(), CPS1_SCROLL1_BASE, m_scroll_size); + m_scroll1 = cps1_base(CPS1_SCROLL1_BASE, m_scroll_size); m_bg_tilemap[0]->mark_all_dirty(); } - if (m_scroll2 != cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size)) + if (m_scroll2 != cps1_base(CPS1_SCROLL2_BASE, m_scroll_size)) { - m_scroll2 = cps1_base(machine(), CPS1_SCROLL2_BASE, m_scroll_size); + m_scroll2 = cps1_base(CPS1_SCROLL2_BASE, m_scroll_size); m_bg_tilemap[1]->mark_all_dirty(); } - if (m_scroll3 != cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size)) + if (m_scroll3 != cps1_base(CPS1_SCROLL3_BASE, m_scroll_size)) { - m_scroll3 = cps1_base(machine(), CPS1_SCROLL3_BASE, m_scroll_size); + m_scroll3 = cps1_base(CPS1_SCROLL3_BASE, m_scroll_size); m_bg_tilemap[2]->mark_all_dirty(); } @@ -1942,8 +1941,8 @@ void cps_state::cps1_get_video_base() scroll3xoff = -0x0c; } - m_obj = cps1_base(machine(), CPS1_OBJ_BASE, m_obj_size); - m_other = cps1_base(machine(), CPS1_OTHER_BASE, m_other_size); + m_obj = cps1_base(CPS1_OBJ_BASE, m_obj_size); + m_other = cps1_base(CPS1_OTHER_BASE, m_other_size); /* Get scroll values */ m_scroll1x = m_cps_a_regs[CPS1_SCROLL1_SCROLLX] + scroll1xoff; |