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

« back to all changes in this revision

Viewing changes to src/mame/video/nycaptor.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:
166
166
                        flipx = ((nycaptor_spriteram[offs+1]&0x40)>>6);
167
167
                        flipy = ((nycaptor_spriteram[offs+1]&0x80)>>7);
168
168
 
169
 
                        drawgfx(bitmap,machine->gfx[1],
 
169
                        drawgfx_transpen(bitmap,cliprect,machine->gfx[1],
170
170
                                        code,
171
171
                                        pal,
172
172
                                        flipx,flipy,
173
 
                                        sx,sy,
174
 
                                        cliprect,TRANSPARENCY_PEN,15);
 
173
                                        sx,sy,15);
175
174
 
176
175
                        if(nycaptor_spriteram[offs+3]>240)
177
176
                        {
178
177
                                sx = (nycaptor_spriteram[offs+3]-256);
179
 
                                drawgfx(bitmap,machine->gfx[1],
 
178
                                drawgfx_transpen(bitmap,cliprect,machine->gfx[1],
180
179
                                        code,
181
180
                                        pal,
182
181
                                        flipx,flipy,
183
 
                                              sx,sy,
184
 
                                              cliprect,TRANSPARENCY_PEN,15);
 
182
                                              sx,sy,15);
185
183
                                        }
186
184
                                }
187
185
                }
201
199
   x - no bg/sprite pri.
202
200
*/
203
201
 
204
 
#define mKEY_MASK(x,y) if (input_code_pressed_once(x)){nycaptor_mask|=y;tilemap_mark_all_tiles_dirty( bg_tilemap );}
 
202
#define mKEY_MASK(x,y) if (input_code_pressed_once(machine, x)){nycaptor_mask|=y;tilemap_mark_all_tiles_dirty( bg_tilemap );}
205
203
 
206
 
static void nycaptor_setmask(void)
 
204
static void nycaptor_setmask(running_machine *machine)
207
205
{
208
206
  mKEY_MASK(KEYCODE_Q,1); /* bg */
209
207
  mKEY_MASK(KEYCODE_W,2);
219
217
  mKEY_MASK(KEYCODE_J,0x400);
220
218
  mKEY_MASK(KEYCODE_K,0x800);
221
219
 
222
 
  if (input_code_pressed_once(KEYCODE_Z)){nycaptor_mask=0;tilemap_mark_all_tiles_dirty( bg_tilemap );} /* disable */
223
 
  if (input_code_pressed_once(KEYCODE_X)){nycaptor_mask|=0x1000;tilemap_mark_all_tiles_dirty( bg_tilemap );} /* no layers */
 
220
  if (input_code_pressed_once(machine, KEYCODE_Z)){nycaptor_mask=0;tilemap_mark_all_tiles_dirty( bg_tilemap );} /* disable */
 
221
  if (input_code_pressed_once(machine, KEYCODE_X)){nycaptor_mask|=0x1000;tilemap_mark_all_tiles_dirty( bg_tilemap );} /* no layers */
224
222
}
225
223
#endif
226
224
 
227
225
VIDEO_UPDATE( nycaptor )
228
226
{
229
227
#if NYCAPTOR_DEBUG
230
 
  nycaptor_setmask();
 
228
  nycaptor_setmask(screen->machine);
231
229
  if(nycaptor_mask&0x1000)
232
230
  {
233
231
        tilemap_draw(bitmap,cliprect,bg_tilemap,TILEMAP_DRAW_LAYER1|3,0);