diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4de87d407..2aae7f949 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -215,6 +215,7 @@ android-arm64-v8a: - .core-defs only: - master + - Tag # Android 64-bit x86 android-x86_64: diff --git a/src/drawgfx.c b/src/drawgfx.c index f1dd748a0..737d09940 100644 --- a/src/drawgfx.c +++ b/src/drawgfx.c @@ -3516,13 +3516,12 @@ static INLINE void plotclip(struct mame_bitmap *bitmap,int x,int y,int pen,const plot_pixel(bitmap,x,y,pen); } -void draw_crosshair(struct mame_bitmap *bitmap,int x,int y,const struct rectangle *clip) +void draw_crosshair(int player_number, struct mame_bitmap *bitmap,int x,int y,const struct rectangle *clip) { unsigned long color,black,white; int i; static int strobe = 0; static bool polarity = true; - static int player_number = 1; static int inactive_xy [MAX_PLAYER_COUNT][3]; if (!options.crosshair_enable) @@ -3537,7 +3536,7 @@ void draw_crosshair(struct mame_bitmap *bitmap,int x,int y,const struct rectangl { if(inactive_xy[player_number-1][2] < 1000) inactive_xy[player_number-1][2]++; - else goto next_player; + else return; } else { @@ -3607,16 +3606,6 @@ void draw_crosshair(struct mame_bitmap *bitmap,int x,int y,const struct rectangl plotclip(bitmap,x+5,y+5,color,clip); plotclip(bitmap,x+6,y+4,color,clip); } - - /* We rely on each frame calling draw_crosshair for each supported lightgun to - track the player_number. Each frame should end with the last lightgun / player - being drawn to reset the player_number for the next frame. This is important - when toggling options.crosshair_enable to keep the player_number in sync. - */ - next_player: - if(player_number >= options.content_flags[CONTENT_LIGHTGUN_COUNT]) player_number = 1; - else player_number++; - } diff --git a/src/drawgfx.h b/src/drawgfx.h index f07bb7266..ccec90f77 100644 --- a/src/drawgfx.h +++ b/src/drawgfx.h @@ -271,7 +271,7 @@ void mdrawgfxzoom( struct mame_bitmap *dest_bmp,const struct GfxElement *gfx, UINT32 priority_mask); void drawgfx_toggle_crosshair(void); -void draw_crosshair(struct mame_bitmap *bitmap,int x,int y,const struct rectangle *clip); +void draw_crosshair(int player_number, struct mame_bitmap *bitmap,int x,int y,const struct rectangle *clip); static INLINE void sect_rect(struct rectangle *dst, const struct rectangle *src) { diff --git a/src/drivers/konamigq.c b/src/drivers/konamigq.c index 35d962770..a220b1e84 100644 --- a/src/drivers/konamigq.c +++ b/src/drivers/konamigq.c @@ -227,9 +227,9 @@ static VIDEO_UPDATE( konamigq ) { video_update_psx( bitmap, cliprect ); - draw_crosshair( bitmap, GUNX( 5 ), GUNY( 6 ), cliprect ); - draw_crosshair( bitmap, GUNX( 7 ), GUNY( 8 ), cliprect ); - draw_crosshair( bitmap, GUNX( 9 ), GUNY( 10 ), cliprect ); + draw_crosshair( 1, bitmap, GUNX( 5 ), GUNY( 6 ), cliprect ); + draw_crosshair( 2, bitmap, GUNX( 7 ), GUNY( 8 ), cliprect ); + draw_crosshair( 3, bitmap, GUNX( 9 ), GUNY( 10 ), cliprect ); } static MEMORY_WRITE32_START( konamigq_writemem ) diff --git a/src/drivers/seattle.c b/src/drivers/seattle.c index 444fdd5e6..988cab2be 100644 --- a/src/drivers/seattle.c +++ b/src/drivers/seattle.c @@ -893,9 +893,9 @@ static VIDEO_UPDATE( carnevil ) /* now draw the crosshairs */ get_crosshair_xy(0, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(1, bitmap, beamx, beamy, cliprect); get_crosshair_xy(1, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(2, bitmap, beamx, beamy, cliprect); } diff --git a/src/vidhrdw/8080bw_vidhrdw.c b/src/vidhrdw/8080bw_vidhrdw.c index f81110465..3df033b0b 100644 --- a/src/vidhrdw/8080bw_vidhrdw.c +++ b/src/vidhrdw/8080bw_vidhrdw.c @@ -980,7 +980,7 @@ static void draw_sight(struct mame_bitmap *bitmap,const struct rectangle *clipre } - draw_crosshair(bitmap,x,y,cliprect); + draw_crosshair(1, bitmap,x,y,cliprect); } diff --git a/src/vidhrdw/astrocde_vidhrdw.c b/src/vidhrdw/astrocde_vidhrdw.c index c8f2d345c..2311b6b48 100644 --- a/src/vidhrdw/astrocde_vidhrdw.c +++ b/src/vidhrdw/astrocde_vidhrdw.c @@ -815,7 +815,7 @@ VIDEO_UPDATE( seawolf2 ) if (centre<2) centre=2; if (centre>317) centre=317; - draw_crosshair(bitmap,centre,35,&Machine->visible_area); + draw_crosshair(1, bitmap,centre,35,&Machine->visible_area); /* Player 2 */ @@ -826,7 +826,7 @@ VIDEO_UPDATE( seawolf2 ) if (centre<1) centre=1; if (centre>316) centre=316; - draw_crosshair(bitmap,centre,33,&Machine->visible_area); + draw_crosshair(2, bitmap,centre,33,&Machine->visible_area); } } } diff --git a/src/vidhrdw/balsente_vidhrdw.c b/src/vidhrdw/balsente_vidhrdw.c index aff77e5ff..88c6d2fdb 100644 --- a/src/vidhrdw/balsente_vidhrdw.c +++ b/src/vidhrdw/balsente_vidhrdw.c @@ -320,6 +320,6 @@ VIDEO_UPDATE( balsente ) int beamx = balsente_shooter_x; int beamy = balsente_shooter_y - 10; - draw_crosshair(bitmap,beamx,beamy,cliprect); + draw_crosshair(1, bitmap,beamx,beamy,cliprect); } } diff --git a/src/vidhrdw/bbusters_vidhrdw.c b/src/vidhrdw/bbusters_vidhrdw.c index b7a155c21..b3fe200c9 100644 --- a/src/vidhrdw/bbusters_vidhrdw.c +++ b/src/vidhrdw/bbusters_vidhrdw.c @@ -293,9 +293,9 @@ VIDEO_UPDATE( bbuster ) draw_sprites(bitmap,buffered_spriteram16,1,0,0); tilemap_draw(bitmap,cliprect,fix_tilemap,0,0); - draw_crosshair(bitmap,readinputport(6),readinputport(5),cliprect); - draw_crosshair(bitmap,readinputport(8),readinputport(7),cliprect); - draw_crosshair(bitmap,readinputport(10),readinputport(9),cliprect); + draw_crosshair(1, bitmap,readinputport(6),readinputport(5),cliprect); + draw_crosshair(2, bitmap,readinputport(8),readinputport(7),cliprect); + draw_crosshair(3, bitmap,readinputport(10),readinputport(9),cliprect); } VIDEO_UPDATE( mechatt ) @@ -310,6 +310,6 @@ VIDEO_UPDATE( mechatt ) draw_sprites(bitmap,buffered_spriteram16,1,0,0); tilemap_draw(bitmap,cliprect,fix_tilemap,0,0); - draw_crosshair(bitmap,readinputport(2),readinputport(3),cliprect); - draw_crosshair(bitmap,readinputport(4),readinputport(5),cliprect); + draw_crosshair(1, bitmap,readinputport(2),readinputport(3),cliprect); + draw_crosshair(2, bitmap,readinputport(4),readinputport(5),cliprect); } diff --git a/src/vidhrdw/exidy440_vidhrdw.c b/src/vidhrdw/exidy440_vidhrdw.c index e97194769..b884db9fb 100644 --- a/src/vidhrdw/exidy440_vidhrdw.c +++ b/src/vidhrdw/exidy440_vidhrdw.c @@ -467,7 +467,7 @@ static void update_screen(struct mame_bitmap *bitmap, const struct rectangle *cl beamx = ((input_port_4_r(0) & 0xff) * 320) >> 8; beamy = ((input_port_5_r(0) & 0xff) * 240) >> 8; - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(1, bitmap, beamx, beamy, cliprect); } } diff --git a/src/vidhrdw/fantland_vidhrdw.c b/src/vidhrdw/fantland_vidhrdw.c index 43dc1fc48..a7f35ecce 100644 --- a/src/vidhrdw/fantland_vidhrdw.c +++ b/src/vidhrdw/fantland_vidhrdw.c @@ -153,7 +153,7 @@ VIDEO_UPDATE( borntofi ) if ( (readinputport(8) > 0) && (readinputport(9) > 0) ) { - draw_crosshair(bitmap, + draw_crosshair(1, bitmap, readinputport(9) * 2 - 0x0e, readinputport(8) * 2 - 0xf8, cliprect); @@ -161,7 +161,7 @@ VIDEO_UPDATE( borntofi ) if ( (readinputport(10) > 0) && (readinputport(11) > 0) ) { - draw_crosshair(bitmap, + draw_crosshair(2, bitmap, readinputport(11) * 2 - 0x0e, readinputport(10) * 2 - 0xf8, cliprect); diff --git a/src/vidhrdw/gaelco2_vidhrdw.c b/src/vidhrdw/gaelco2_vidhrdw.c index 79888d59e..dd1bc2ec8 100644 --- a/src/vidhrdw/gaelco2_vidhrdw.c +++ b/src/vidhrdw/gaelco2_vidhrdw.c @@ -524,12 +524,12 @@ VIDEO_UPDATE( bang ) /* 1P Gun */ posx = readinputport(3)*320/256; posy = readinputport(5)*240/256; - draw_crosshair(bitmap, posx, posy + 0x0c, cliprect); + draw_crosshair(1, bitmap, posx, posy + 0x0c, cliprect); /* 2P Gun */ posx = readinputport(4)*320/256; posy = readinputport(6)*240/256; - draw_crosshair(bitmap, posx, posy + 0x0c, cliprect); + draw_crosshair(2, bitmap, posx, posy + 0x0c, cliprect); } } diff --git a/src/vidhrdw/jaguar_vidhrdw.c b/src/vidhrdw/jaguar_vidhrdw.c index 217a3f440..a65ee5435 100644 --- a/src/vidhrdw/jaguar_vidhrdw.c +++ b/src/vidhrdw/jaguar_vidhrdw.c @@ -761,11 +761,11 @@ VIDEO_UPDATE( cojag ) /* draw player 1's crosshair */ get_crosshair_xy(0, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(1, bitmap, beamx, beamy, cliprect); /* draw player 2's crosshair */ get_crosshair_xy(1, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(2, bitmap, beamx, beamy, cliprect); } } diff --git a/src/vidhrdw/konamigx_vidhrdw.c b/src/vidhrdw/konamigx_vidhrdw.c index da59e6a5d..ea2a1f4f5 100644 --- a/src/vidhrdw/konamigx_vidhrdw.c +++ b/src/vidhrdw/konamigx_vidhrdw.c @@ -488,8 +488,8 @@ VIDEO_UPDATE(konamigx) if( gx_invertlayersBC ) { - draw_crosshair( bitmap, readinputport( 9)*287/0xff+24, readinputport(10)*223/0xff+16, cliprect ); - draw_crosshair( bitmap, readinputport(11)*287/0xff+24, readinputport(12)*223/0xff+16, cliprect ); + draw_crosshair( 1, bitmap, readinputport( 9)*287/0xff+24, readinputport(10)*223/0xff+16, cliprect ); + draw_crosshair( 2, bitmap, readinputport(11)*287/0xff+24, readinputport(12)*223/0xff+16, cliprect ); } } diff --git a/src/vidhrdw/lethal_vidhrdw.c b/src/vidhrdw/lethal_vidhrdw.c index feaf06f44..362b28558 100644 --- a/src/vidhrdw/lethal_vidhrdw.c +++ b/src/vidhrdw/lethal_vidhrdw.c @@ -138,8 +138,8 @@ VIDEO_UPDATE(lethalen) /* force "A" layer over top of everything */ K056832_tilemap_draw(bitmap, cliprect, 0, 0, 0); - draw_crosshair(bitmap, GUNX(1)+216, 240-GUNY(1), cliprect ); - draw_crosshair(bitmap, GUNX(2)+216, 240-GUNY(2), cliprect ); + draw_crosshair(1, bitmap, GUNX(1)+216, 240-GUNY(1), cliprect ); + draw_crosshair(2, bitmap, GUNX(2)+216, 240-GUNY(2), cliprect ); #if 0 diff --git a/src/vidhrdw/lethalj_vidhrdw.c b/src/vidhrdw/lethalj_vidhrdw.c index cf36efea9..bab75b988 100644 --- a/src/vidhrdw/lethalj_vidhrdw.c +++ b/src/vidhrdw/lethalj_vidhrdw.c @@ -215,11 +215,11 @@ VIDEO_UPDATE( lethalj ) /* draw player 1's crosshair */ get_crosshair_xy(0, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(1, bitmap, beamx, beamy, cliprect); /* draw player 2's crosshair */ get_crosshair_xy(1, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(2, bitmap, beamx, beamy, cliprect); if (cliprect->max_y == Machine->visible_area.max_y) blank_palette = 0; diff --git a/src/vidhrdw/namconb1_vidhrdw.c b/src/vidhrdw/namconb1_vidhrdw.c index 625808650..078e8cc2f 100644 --- a/src/vidhrdw/namconb1_vidhrdw.c +++ b/src/vidhrdw/namconb1_vidhrdw.c @@ -243,11 +243,11 @@ VIDEO_UPDATE( namconb1 ) { beamx = ((readinputport(4))*288)/256; beamy = ((readinputport(5))*224)/256; - draw_crosshair( bitmap, beamx, beamy, cliprect ); + draw_crosshair( 1, bitmap, beamx, beamy, cliprect ); beamx = ((readinputport(6))*288)/256; beamy = ((readinputport(7))*224)/256; - draw_crosshair( bitmap, beamx, beamy, cliprect ); + draw_crosshair( 2, bitmap, beamx, beamy, cliprect ); } } diff --git a/src/vidhrdw/namcos2_vidhrdw.c b/src/vidhrdw/namcos2_vidhrdw.c index a711284c4..45cce3c71 100644 --- a/src/vidhrdw/namcos2_vidhrdw.c +++ b/src/vidhrdw/namcos2_vidhrdw.c @@ -630,11 +630,11 @@ DrawCrossshair( struct mame_bitmap *bitmap, const struct rectangle *cliprect ) beamx = readinputport(2+x1port)*bitmap->width/256; beamy = readinputport(2+y1port)*bitmap->height/256; - draw_crosshair( bitmap, beamx, beamy, cliprect ); + draw_crosshair( 1, bitmap, beamx, beamy, cliprect ); beamx = readinputport(2+x2port)*bitmap->width/256; beamy = readinputport(2+y2port)*bitmap->height/256; - draw_crosshair( bitmap, beamx, beamy, cliprect ); + draw_crosshair( 2, bitmap, beamx, beamy, cliprect ); } /**************************************************************************/ diff --git a/src/vidhrdw/nycaptor_vidhrdw.c b/src/vidhrdw/nycaptor_vidhrdw.c index d77e1eed4..2d59271ce 100644 --- a/src/vidhrdw/nycaptor_vidhrdw.c +++ b/src/vidhrdw/nycaptor_vidhrdw.c @@ -307,7 +307,7 @@ VIDEO_UPDATE( nycaptor ) break; } if(nyc_gametype==1) - draw_crosshair(bitmap,readinputport(5),255-readinputport(6),cliprect); + draw_crosshair(1, bitmap,readinputport(5),255-readinputport(6),cliprect); else - draw_crosshair(bitmap,readinputport(5),readinputport(6),cliprect); + draw_crosshair(1, bitmap,readinputport(5),readinputport(6),cliprect); } diff --git a/src/vidhrdw/oneshot_vidhrdw.c b/src/vidhrdw/oneshot_vidhrdw.c index fc4a4aea4..af27b936b 100644 --- a/src/vidhrdw/oneshot_vidhrdw.c +++ b/src/vidhrdw/oneshot_vidhrdw.c @@ -105,7 +105,7 @@ static void oneshot_drawcrosshairs( struct mame_bitmap *bitmap, const struct rec gun_y_p1=0; /* draw crosshair */ - draw_crosshair( bitmap, xpos, ypos, cliprect ); + draw_crosshair( 1, bitmap, xpos, ypos, cliprect ); /* get gun raw coordonates (player 2) */ @@ -120,7 +120,7 @@ static void oneshot_drawcrosshairs( struct mame_bitmap *bitmap, const struct rec gun_x_p2=0; /* draw crosshair */ - draw_crosshair( bitmap, xpos, ypos, cliprect ); + draw_crosshair( 2, bitmap, xpos, ypos, cliprect ); } static void oneshot_drawsprites( struct mame_bitmap *bitmap, const struct rectangle *cliprect ) diff --git a/src/vidhrdw/othunder_vidhrdw.c b/src/vidhrdw/othunder_vidhrdw.c index 146e3def0..1b2afc437 100644 --- a/src/vidhrdw/othunder_vidhrdw.c +++ b/src/vidhrdw/othunder_vidhrdw.c @@ -310,7 +310,7 @@ VIDEO_UPDATE( othunder ) screeny += 2; /* player 1 */ - draw_crosshair(bitmap,screenx,screeny,cliprect); + draw_crosshair(1, bitmap,screenx,screeny,cliprect); /* calculate p2 screen co-ords by matching routine at $AA48 */ rawx = othunder_ram[0x284c/2]; @@ -353,6 +353,6 @@ VIDEO_UPDATE( othunder ) screeny += 2; /* player 2 */ - draw_crosshair(bitmap,screenx,screeny,cliprect); + draw_crosshair(2, bitmap,screenx,screeny,cliprect); } } diff --git a/src/vidhrdw/playch10_vidhrdw.c b/src/vidhrdw/playch10_vidhrdw.c index 73574b0c9..951f7d417 100644 --- a/src/vidhrdw/playch10_vidhrdw.c +++ b/src/vidhrdw/playch10_vidhrdw.c @@ -138,7 +138,7 @@ VIDEO_UPDATE( playch10 ) int x_center = readinputport( 5 ); int y_center = readinputport( 6 ) + 30*8; - draw_crosshair(bitmap, x_center, y_center, &bottom_monitor); + draw_crosshair(1, bitmap, x_center, y_center, &bottom_monitor); } } diff --git a/src/vidhrdw/policetr_vidhrdw.c b/src/vidhrdw/policetr_vidhrdw.c index 141c08da0..7309dcd96 100644 --- a/src/vidhrdw/policetr_vidhrdw.c +++ b/src/vidhrdw/policetr_vidhrdw.c @@ -368,10 +368,10 @@ VIDEO_UPDATE( policetr ) /* draw player 1's crosshair */ beamx = ((readinputport(3) & 0xff) * Machine->drv->screen_width) >> 8; beamy = ((readinputport(4) & 0xff) * Machine->drv->screen_height) >> 8; - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(1, bitmap, beamx, beamy, cliprect); /* draw player 2's crosshair */ beamx = ((readinputport(5) & 0xff) * Machine->drv->screen_width) >> 8; beamy = ((readinputport(6) & 0xff) * Machine->drv->screen_height) >> 8; - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(2, bitmap, beamx, beamy, cliprect); } diff --git a/src/vidhrdw/rastan_vidhrdw.c b/src/vidhrdw/rastan_vidhrdw.c index 1bae9e7be..c72d42a1e 100644 --- a/src/vidhrdw/rastan_vidhrdw.c +++ b/src/vidhrdw/rastan_vidhrdw.c @@ -166,7 +166,7 @@ VIDEO_UPDATE( opwolf ) if (1) /*input_port_4_word_r(0,0) &0x1) // Fake DSW */ { /* Draw an aiming crosshair */ - draw_crosshair(bitmap,(input_port_4_word_r(0,0xffff)*320)/256,input_port_5_word_r(0,0xffff),cliprect); + draw_crosshair(1, bitmap,(input_port_4_word_r(0,0xffff)*320)/256,input_port_5_word_r(0,0xffff),cliprect); } } diff --git a/src/vidhrdw/seta2_vidhrdw.c b/src/vidhrdw/seta2_vidhrdw.c index 11a31eba1..38f938b8d 100644 --- a/src/vidhrdw/seta2_vidhrdw.c +++ b/src/vidhrdw/seta2_vidhrdw.c @@ -400,12 +400,12 @@ VIDEO_UPDATE( seta2_gun ) xpos = (readinputport(2) * 320) / 160; - draw_crosshair(bitmap,xpos-8,readinputport(8)+46,cliprect); + draw_crosshair(1, bitmap,xpos-8,readinputport(8)+46,cliprect); xpos = (readinputport(3) * 320) / 160; if (readinputport(3) != 0xff) /* not 1 player */ - draw_crosshair(bitmap,xpos-8,readinputport(9)+46,cliprect); + draw_crosshair(2, bitmap,xpos-8,readinputport(9)+46,cliprect); } diff --git a/src/vidhrdw/seta_vidhrdw.c b/src/vidhrdw/seta_vidhrdw.c index f44ef0454..d0cbac05a 100644 --- a/src/vidhrdw/seta_vidhrdw.c +++ b/src/vidhrdw/seta_vidhrdw.c @@ -812,8 +812,8 @@ static void zombraid_drawcrosshairs( struct mame_bitmap *bitmap, const struct re int p2_x = seta_workram[0xC4AE/2]; int p2_y = 0x08+0xff - seta_workram[0xC4B0/2]; - draw_crosshair(bitmap,p1_x,p1_y,cliprect); - draw_crosshair(bitmap,p2_x,p2_y,cliprect); + draw_crosshair(1, bitmap,p1_x,p1_y,cliprect); + draw_crosshair(2, bitmap,p2_x,p2_y,cliprect); } diff --git a/src/vidhrdw/ssv_vidhrdw.c b/src/vidhrdw/ssv_vidhrdw.c index 97aa6b3cd..bc954ce5b 100644 --- a/src/vidhrdw/ssv_vidhrdw.c +++ b/src/vidhrdw/ssv_vidhrdw.c @@ -1510,12 +1510,12 @@ VIDEO_UPDATE( gdfs ) tilemap_draw(bitmap,cliprect, gdfs_tmap, 0, 0); #if 0 - draw_crosshair(bitmap, + draw_crosshair(1, bitmap, Machine->visible_area.min_x + ((Machine->visible_area.max_x - Machine->visible_area.min_x) * readinputport(5)) / 255, Machine->visible_area.min_y + ((Machine->visible_area.max_y - Machine->visible_area.min_y) * readinputport(6)) / 255, cliprect,0); - draw_crosshair(bitmap, + draw_crosshair(2, bitmap, Machine->visible_area.min_x + ((Machine->visible_area.max_x - Machine->visible_area.min_x) * readinputport(7)) / 255, Machine->visible_area.min_y + ((Machine->visible_area.max_y - Machine->visible_area.min_y) * readinputport(8)) / 255, cliprect,1); diff --git a/src/vidhrdw/taito_z_vidhrdw.c b/src/vidhrdw/taito_z_vidhrdw.c index 03a38b824..04de05a2f 100644 --- a/src/vidhrdw/taito_z_vidhrdw.c +++ b/src/vidhrdw/taito_z_vidhrdw.c @@ -1034,7 +1034,7 @@ VIDEO_UPDATE( spacegun ) --screenx; screeny += 15; - draw_crosshair(bitmap,screenx,screeny,cliprect); + draw_crosshair(1, bitmap,screenx,screeny,cliprect); /* calculate p2 screen co-ords by matching routine at $196EA */ rawx = taitoz_sharedram[0xd98/2]; @@ -1081,7 +1081,7 @@ VIDEO_UPDATE( spacegun ) --screenx; screeny += 15; - draw_crosshair(bitmap,screenx,screeny,cliprect); + draw_crosshair(2, bitmap,screenx,screeny,cliprect); } } diff --git a/src/vidhrdw/targeth_vidhrdw.c b/src/vidhrdw/targeth_vidhrdw.c index c35594862..7a36232c1 100644 --- a/src/vidhrdw/targeth_vidhrdw.c +++ b/src/vidhrdw/targeth_vidhrdw.c @@ -161,11 +161,11 @@ VIDEO_UPDATE( targeth ) /* 1P Gun */ posx = readinputport(0) & 0x1ff; posy = readinputport(1) & 0x0ff; - draw_crosshair(bitmap, posx - 0x17, posy + 1, cliprect); + draw_crosshair(1, bitmap, posx - 0x17, posy + 1, cliprect); /* 2P Gun */ posx = readinputport(2) & 0x1ff; posy = readinputport(3) & 0x0ff; - draw_crosshair(bitmap, posx - 0x17, posy + 1, cliprect); + draw_crosshair(2, bitmap, posx - 0x17, posy + 1, cliprect); } } diff --git a/src/vidhrdw/tickee_vidhrdw.c b/src/vidhrdw/tickee_vidhrdw.c index edbc534aa..fe237b15c 100644 --- a/src/vidhrdw/tickee_vidhrdw.c +++ b/src/vidhrdw/tickee_vidhrdw.c @@ -139,9 +139,9 @@ VIDEO_UPDATE( tickee ) /* draw player 1's crosshair */ get_crosshair_xy(0, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(1, bitmap, beamx, beamy, cliprect); /* draw player 2's crosshair */ get_crosshair_xy(1, &beamx, &beamy); - draw_crosshair(bitmap, beamx, beamy, cliprect); + draw_crosshair(2, bitmap, beamx, beamy, cliprect); } diff --git a/src/vidhrdw/triplhnt_vidhrdw.c b/src/vidhrdw/triplhnt_vidhrdw.c index b49dc37ff..f5bd328c0 100644 --- a/src/vidhrdw/triplhnt_vidhrdw.c +++ b/src/vidhrdw/triplhnt_vidhrdw.c @@ -153,5 +153,5 @@ VIDEO_UPDATE( triplhnt ) triplhnt_draw_sprites(bitmap, cliprect); - draw_crosshair(bitmap, cross_x, cross_y, cliprect); + draw_crosshair(1, bitmap, cross_x, cross_y, cliprect); } diff --git a/src/vidhrdw/undrfire_vidhrdw.c b/src/vidhrdw/undrfire_vidhrdw.c index 976239e0a..1b2a24211 100644 --- a/src/vidhrdw/undrfire_vidhrdw.c +++ b/src/vidhrdw/undrfire_vidhrdw.c @@ -489,8 +489,8 @@ VIDEO_UPDATE( undrfire ) TC0480SCP_tilemap_draw(bitmap,cliprect,layer[4],0,0); /* TC0480SCP text layer */ /* draw artificial gun targets */ - draw_crosshair( bitmap, (255 - readinputport(3)) * 1.255, readinputport(4) + 9, cliprect ); - draw_crosshair( bitmap, (255 - readinputport(5)) * 1.255, readinputport(6) + 9, cliprect ); + draw_crosshair( 1, bitmap, (255 - readinputport(3)) * 1.255, readinputport(4) + 9, cliprect ); + draw_crosshair( 2, bitmap, (255 - readinputport(5)) * 1.255, readinputport(6) + 9, cliprect ); /* Enable this to see rotation (?) control words */ #if 0 diff --git a/src/vidhrdw/unico_vidhrdw.c b/src/vidhrdw/unico_vidhrdw.c index 6c5453191..bdac26faa 100644 --- a/src/vidhrdw/unico_vidhrdw.c +++ b/src/vidhrdw/unico_vidhrdw.c @@ -383,12 +383,12 @@ if ( keyboard_pressed(KEYCODE_Z) || keyboard_pressed(KEYCODE_X) ) /* Draw the gunsight for ligth gun games */ if (unico_has_lightgun) { - draw_crosshair(bitmap, + draw_crosshair(1, bitmap, readinputport(6)*384/256, readinputport(5)*224/256, cliprect); - draw_crosshair(bitmap, + draw_crosshair(2, bitmap, readinputport(4)*384/256, readinputport(3)*224/256, cliprect); @@ -433,12 +433,12 @@ if ( keyboard_pressed(KEYCODE_Z) || keyboard_pressed(KEYCODE_X) ) /* Draw the gunsight for ligth gun games */ if (unico_has_lightgun) { - draw_crosshair(bitmap, + draw_crosshair(1, bitmap, readinputport(6)*384/256, readinputport(5)*224/256, cliprect); - draw_crosshair(bitmap, + draw_crosshair(2, bitmap, readinputport(4)*384/256, readinputport(3)*224/256, cliprect); diff --git a/src/vidhrdw/vsnes_vidhrdw.c b/src/vidhrdw/vsnes_vidhrdw.c index 6ce9bcc8b..26ca163dc 100644 --- a/src/vidhrdw/vsnes_vidhrdw.c +++ b/src/vidhrdw/vsnes_vidhrdw.c @@ -69,7 +69,7 @@ VIDEO_UPDATE( vsnes ) int x_center = readinputport( 4 ); int y_center = readinputport( 5 ); - draw_crosshair(bitmap,x_center,y_center,&Machine->visible_area); + draw_crosshair(1, bitmap,x_center,y_center,&Machine->visible_area); }