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

« back to all changes in this revision

Viewing changes to src/mame/video/jackal.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:
14
14
 
15
15
PALETTE_INIT( jackal )
16
16
{
 
17
        const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
17
18
        int i;
18
19
 
19
20
        /* allocate the colortable */
63
64
 
64
65
static TILE_GET_INFO( get_bg_tile_info )
65
66
{
66
 
        UINT8 *RAM = machine.region("master")->base();
 
67
        UINT8 *RAM = machine.root_device().memregion("master")->base();
67
68
 
68
69
        int attr = RAM[0x2000 + tile_index];
69
70
        int code = RAM[0x2400 + tile_index] + ((attr & 0xc0) << 2) + ((attr & 0x30) << 6);
82
83
static void draw_background( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
83
84
{
84
85
        jackal_state *state = machine.driver_data<jackal_state>();
85
 
        UINT8 *RAM = machine.region("master")->base();
 
86
        UINT8 *RAM = state->memregion("master")->base();
86
87
        int i;
87
88
 
88
89
        state->m_scrollram = &RAM[0x0020];
119
120
 
120
121
static void draw_sprites_region( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect, const UINT8 *sram, int length, int bank )
121
122
{
 
123
        jackal_state *state = machine.driver_data<jackal_state>();
122
124
        int offs;
123
125
 
124
126
        for (offs = 0; offs < length; offs += 5)
137
139
                if (sy > 0xf0)
138
140
                        sy = sy - 256;
139
141
 
140
 
                if (flip_screen_get(machine))
 
142
                if (state->flip_screen())
141
143
                {
142
144
                        sx = 240 - sx;
143
145
                        sy = 240 - sy;
150
152
                        int spritenum = sn1 * 4 + ((sn2 & (8 + 4)) >> 2) + ((sn2 & (2 + 1)) << 10);
151
153
                        int mod = -8;
152
154
 
153
 
                        if (flip_screen_get(machine))
 
155
                        if (state->flip_screen())
154
156
                        {
155
157
                                sx += 8;
156
158
                                sy -= 8;
159
161
 
160
162
                        if ((attr & 0x0C) == 0x0C)
161
163
                        {
162
 
                                if (flip_screen_get(machine)) sy += 16;
 
164
                                if (state->flip_screen()) sy += 16;
163
165
                                DRAW_SPRITE(bank + 1, spritenum, sx, sy)
164
166
                        }
165
167
 
182
184
 
183
185
                        if (attr & 0x10)
184
186
                        {
185
 
                                if (flip_screen_get(machine))
 
187
                                if (state->flip_screen())
186
188
                                {
187
189
                                        sx -= 16;
188
190
                                        sy -= 16;
204
206
static void draw_sprites( running_machine &machine, bitmap_ind16 &bitmap, const rectangle &cliprect )
205
207
{
206
208
        jackal_state *state = machine.driver_data<jackal_state>();
207
 
        UINT8 *RAM = machine.region("master")->base();
 
209
        UINT8 *RAM = state->memregion("master")->base();
208
210
        UINT8 *sr, *ss;
209
211
 
210
212
        if (state->m_videoctrl[0x03] & 0x08)