~ubuntu-branches/debian/wheezy/mame/wheezy

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Jordi Mallach, Emmanuel Kasper, Félix Arreola Rodríguez, Jordi Mallach
  • Date: 2011-05-11 21:06:50 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20110511210650-jizvh8a6x117y9hr
Tags: 0.142-1
[ Emmanuel Kasper ]
* New upstream release
* Set NOWERROR=1 to allow compiling with gcc-4.6
* Remove fix_powerpc_build.patch, as upstream has taken it in this release
* Add gnome-video-arcade front end as a suggested package

[ Félix Arreola Rodríguez ]
* Add kfreebsd-build.patch to quilt series, to fix build on kfreebsd

[ Jordi Mallach ]
* Remove unneeded and bogus addition of --with-quilt to the dh invocation.
* Add Cesare Falco (long time Ubuntu maintainer) to Uploaders, and wrap
  them into multiple lines.

Show diffs side-by-side

added added

removed removed

Lines of Context:
21
21
 
22
22
WRITE8_HANDLER( tutankhm_flip_screen_x_w )
23
23
{
24
 
        tutankhm_state *state = space->machine->driver_data<tutankhm_state>();
25
 
        state->flip_x = data & 0x01;
 
24
        tutankhm_state *state = space->machine().driver_data<tutankhm_state>();
 
25
        state->m_flip_x = data & 0x01;
26
26
}
27
27
 
28
28
 
29
29
WRITE8_HANDLER( tutankhm_flip_screen_y_w )
30
30
{
31
 
        tutankhm_state *state = space->machine->driver_data<tutankhm_state>();
32
 
        state->flip_y = data & 0x01;
 
31
        tutankhm_state *state = space->machine().driver_data<tutankhm_state>();
 
32
        state->m_flip_y = data & 0x01;
33
33
}
34
34
 
35
35
 
39
39
 *
40
40
 *************************************/
41
41
 
42
 
static void get_pens( running_machine *machine, pen_t *pens )
 
42
static void get_pens( running_machine &machine, pen_t *pens )
43
43
{
44
 
        tutankhm_state *state = machine->driver_data<tutankhm_state>();
 
44
        tutankhm_state *state = machine.driver_data<tutankhm_state>();
45
45
        offs_t i;
46
46
 
47
47
        for (i = 0; i < NUM_PENS; i++)
48
48
        {
49
 
                UINT8 data = state->paletteram[i];
 
49
                UINT8 data = state->m_paletteram[i];
50
50
 
51
51
                pens[i] = MAKE_RGB(pal3bit(data >> 0), pal3bit(data >> 3), pal2bit(data >> 6));
52
52
        }
59
59
 *
60
60
 *************************************/
61
61
 
62
 
VIDEO_UPDATE( tutankhm )
 
62
SCREEN_UPDATE( tutankhm )
63
63
{
64
 
        tutankhm_state *state = screen->machine->driver_data<tutankhm_state>();
65
 
        int xorx = state->flip_x ? 255 : 0;
66
 
        int xory = state->flip_y ? 255 : 0;
 
64
        tutankhm_state *state = screen->machine().driver_data<tutankhm_state>();
 
65
        int xorx = state->m_flip_x ? 255 : 0;
 
66
        int xory = state->m_flip_y ? 255 : 0;
67
67
        pen_t pens[NUM_PENS];
68
68
        int x, y;
69
69
 
70
 
        get_pens(screen->machine, pens);
 
70
        get_pens(screen->machine(), pens);
71
71
 
72
72
        for (y = cliprect->min_y; y <= cliprect->max_y; y++)
73
73
        {
76
76
                for (x = cliprect->min_x; x <= cliprect->max_x; x++)
77
77
                {
78
78
                        UINT8 effx = x ^ xorx;
79
 
                        UINT8 yscroll = (effx < 192) ? *state->scroll : 0;
 
79
                        UINT8 yscroll = (effx < 192) ? *state->m_scroll : 0;
80
80
                        UINT8 effy = (y ^ xory) + yscroll;
81
 
                        UINT8 vrambyte = state->videoram[effy * 128 + effx / 2];
 
81
                        UINT8 vrambyte = state->m_videoram[effy * 128 + effx / 2];
82
82
                        UINT8 shifted = vrambyte >> (4 * (effx % 2));
83
83
                        dst[x] = pens[shifted & 0x0f];
84
84
                }