~ubuntu-branches/ubuntu/lucid/sdlmame/lucid

« back to all changes in this revision

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

  • Committer: Bazaar Package Importer
  • Author(s): Cesare Falco
  • Date: 2009-11-03 17:10:15 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20091103171015-6hop4ory5lxnumpn
Tags: 0.135-0ubuntu1
* New upstream release - Closes (LP: #403212)
* debian/watch: unstable releases are no longer detected
* mame.ini: added the cheat subdirectories to cheatpath so zipped
  cheatfiles will be searched too
* renamed crsshair subdirectory to crosshair to reflect upstream change
* mame.ini: renamed references to crosshair subdirectory (see above)

Show diffs side-by-side

added added

removed removed

Lines of Context:
110
110
}
111
111
 
112
112
 
113
 
static void draw_sprites(gfx_element **gfx, bitmap_t *bitmap, const rectangle *cliprect, int flip)
 
113
static void draw_sprites(bitmap_t *bitmap, const rectangle *cliprect, const gfx_element *gfx, int flip)
114
114
{
115
115
        offs_t offs;
116
116
 
130
130
                        if (!flip)
131
131
                                code++;
132
132
 
133
 
                        drawgfx(bitmap, gfx[1], code, color, 0, 0, x, y, cliprect, TRANSPARENCY_PEN, 0);
 
133
                        drawgfx_transpen(bitmap, cliprect, gfx, code, color, 0, 0, x, y, 0);
134
134
                }
135
135
                else
136
136
                {
137
137
                        if (cheekyms_spriteram[offs + 0] & 0x02)
138
138
                        {
139
 
                                drawgfx(bitmap, gfx[1], code | 0x20, color, 0, 0,        x, y, cliprect, TRANSPARENCY_PEN, 0);
140
 
                                drawgfx(bitmap, gfx[1], code | 0x21, color, 0, 0, 0x10 + x, y, cliprect, TRANSPARENCY_PEN, 0);
 
139
                                drawgfx_transpen(bitmap, cliprect, gfx, code | 0x20, color, 0, 0,        x, y, 0);
 
140
                                drawgfx_transpen(bitmap, cliprect, gfx, code | 0x21, color, 0, 0, 0x10 + x, y, 0);
141
141
                        }
142
142
                        else
143
143
                        {
144
 
                                drawgfx(bitmap, gfx[1], code | 0x20, color, 0, 0, x,        y, cliprect, TRANSPARENCY_PEN, 0);
145
 
                                drawgfx(bitmap, gfx[1], code | 0x21, color, 0, 0, x, 0x10 + y, cliprect, TRANSPARENCY_PEN, 0);
 
144
                                drawgfx_transpen(bitmap, cliprect, gfx, code | 0x20, color, 0, 0, x,        y, 0);
 
145
                                drawgfx_transpen(bitmap, cliprect, gfx, code | 0x21, color, 0, 0, x, 0x10 + y, 0);
146
146
                        }
147
147
                }
148
148
        }
155
155
        int scrolly = ((*cheekyms_port_80 >> 3) & 0x07);
156
156
        int flip = *cheekyms_port_80 & 0x80;
157
157
 
158
 
        tilemap_mark_all_tiles_dirty(ALL_TILEMAPS);
159
 
        tilemap_set_flip(ALL_TILEMAPS, flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
 
158
        tilemap_mark_all_tiles_dirty_all(screen->machine);
 
159
        tilemap_set_flip_all(screen->machine, flip ? TILEMAP_FLIPX | TILEMAP_FLIPY : 0);
160
160
 
161
161
        bitmap_fill(bitmap, cliprect, 0);
162
162
        bitmap_fill(bitmap_buffer, cliprect, 0);
163
163
 
164
164
        /* sprites go under the playfield */
165
 
        draw_sprites(screen->machine->gfx, bitmap, cliprect, flip);
 
165
        draw_sprites(bitmap, cliprect, screen->machine->gfx[1], flip);
166
166
 
167
167
        /* draw the tilemap to a temp bitmap */
168
168
        tilemap_draw(bitmap_buffer, cliprect, cheekyms_tilemap, 0, 0);