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

« back to all changes in this revision

Viewing changes to src/mame/video/ambush.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:
20
20
 
21
21
PALETTE_INIT( ambush )
22
22
{
 
23
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
23
24
        int i;
24
25
 
25
26
        for (i = 0; i < machine.total_colors(); i++)
54
55
 
55
56
        transpen = (priority == 0) ? -1 : 0;
56
57
 
57
 
        for (offs = 0; offs < state->m_videoram_size; offs++)
 
58
        for (offs = 0; offs < state->m_videoram.bytes(); offs++)
58
59
        {
59
60
                int code, sx, sy, col;
60
61
                UINT8 scroll;
71
72
 
72
73
                code = state->m_videoram[offs] | ((col & 0x60) << 3);
73
74
 
74
 
                if (flip_screen_get(machine))
 
75
                if (state->flip_screen())
75
76
                {
76
77
                        sx = 31 - sx;
77
78
                        sy = 31 - sy;
81
82
                drawgfx_transpen(bitmap,cliprect,machine.gfx[0],
82
83
                        code,
83
84
                        (col & 0x0f) | ((*state->m_colorbank & 0x03) << 4),
84
 
                        flip_screen_get(machine), flip_screen_get(machine),
 
85
                        state->flip_screen(), state->flip_screen(),
85
86
                        8 * sx, (8 * sy + scroll) & 0xff, transpen);
86
87
        }
87
88
}
98
99
        draw_chars(screen.machine(), bitmap, cliprect, 0x00);
99
100
 
100
101
        /* Draw the sprites. */
101
 
        for (offs = state->m_spriteram_size - 4; offs >= 0; offs -= 4)
 
102
        for (offs = state->m_spriteram.bytes() - 4; offs >= 0; offs -= 4)
102
103
        {
103
104
                int code, col, sx, sy, flipx, flipy, gfx;
104
105
 
119
120
                        /* 16x16 sprites */
120
121
                        gfx = 1;
121
122
 
122
 
                        if (!flip_screen_get(screen.machine()))
 
123
                        if (!state->flip_screen())
123
124
                                sy = 240 - sy;
124
125
                        else
125
126
                                sx = 240 - sx;
130
131
                        gfx = 0;
131
132
                        code <<= 2;
132
133
 
133
 
                        if (!flip_screen_get(screen.machine()))
 
134
                        if (!state->flip_screen())
134
135
                                sy = 248 - sy;
135
136
                        else
136
137
                                sx = 248 - sx;
140
141
                flipx = state->m_spriteram[offs + 1] & 0x40;
141
142
                flipy = state->m_spriteram[offs + 1] & 0x80;
142
143
 
143
 
                if (flip_screen_get(screen.machine()))
 
144
                if (state->flip_screen())
144
145
                {
145
146
                        flipx = !flipx;
146
147
                        flipy = !flipy;