~ubuntu-branches/debian/sid/mame/sid

« back to all changes in this revision

Viewing changes to src/mame/video/homerun.c

  • Committer: Package Import Robot
  • Author(s): Jordi Mallach, Emmanuel Kasper, Jordi Mallach
  • Date: 2012-06-05 20:02:23 UTC
  • mfrom: (0.3.1) (0.1.4)
  • Revision ID: package-import@ubuntu.com-20120605200223-gnlpogjrg6oqe9md
Tags: 0.146-1
[ Emmanuel Kasper ]
* New upstream release
* Drop patch to fix man pages section and patches to link with flac 
  and jpeg system lib: all this has been pushed upstream by Cesare Falco
* Add DM-Upload-Allowed: yes field.

[ Jordi Mallach ]
* Create a "gnu" TARGETOS stanza that defines NO_AFFINITY_NP.
* Stop setting TARGETOS to "unix" in d/rules. It should be autodetected,
  and set to the appropriate value.
* mame_manpage_section.patch: Change mame's manpage section to 6 (games),
  in the TH declaration.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
        state->m_tilemap->mark_all_dirty();
16
16
 
17
17
        data >>= 5;
18
 
        memory_set_bank(device->machine(), "bank1", data & 0x07);
 
18
        state->membank("bank1")->set_entry(data & 0x07);
19
19
}
20
20
 
21
 
WRITE8_HANDLER( homerun_videoram_w )
 
21
WRITE8_MEMBER(homerun_state::homerun_videoram_w)
22
22
{
23
 
        homerun_state *state = space->machine().driver_data<homerun_state>();
24
 
        state->m_videoram[offset] = data;
25
 
        state->m_tilemap->mark_tile_dirty(offset & 0xfff);
 
23
        m_videoram[offset] = data;
 
24
        m_tilemap->mark_tile_dirty(offset & 0xfff);
26
25
}
27
26
 
28
 
WRITE8_HANDLER(homerun_color_w)
 
27
WRITE8_MEMBER(homerun_state::homerun_color_w)
29
28
{
30
29
        int r, g, b;
31
30
        int bit0, bit1, bit2;
41
40
        bit1 = (data >> 6) & 0x01;
42
41
        bit2 = (data >> 7) & 0x01;
43
42
        b = 0x21 * bit0 + 0x47 * bit1 + 0x97 * bit2;
44
 
        palette_set_color(space->machine(), offset, MAKE_RGB(r,g,b));
 
43
        palette_set_color(machine(), offset, MAKE_RGB(r,g,b));
45
44
}
46
45
 
47
46
static TILE_GET_INFO( get_homerun_tile_info )
65
64
        UINT8 *spriteram = state->m_spriteram;
66
65
        int offs;
67
66
 
68
 
        for (offs = state->m_spriteram_size - 4; offs >=0; offs -= 4)
 
67
        for (offs = state->m_spriteram.bytes() - 4; offs >=0; offs -= 4)
69
68
        {
70
69
                int code, color, sx, sy, flipx, flipy;
71
70
                sx = spriteram[offs + 3];