Main > Lightguns
Removing the crosshairs in mame lightgun games
<< < (2/3) > >>
Howard_Casto:
to use it simply type:

crosshair/nocrosshair  ch/noch at the command prompt to set it



If anyone wants to try it feel free and post your results (i should be able to fix any glitches on paper)


Once the next official build comes out I'll go ahead and submit it to mame.  If nothing else, I'll have sirp add it to his hacks page so it can be added to noname mame and all the others.

TheGatesofBill:

--- Quote from: Howard_Casto on April 19, 2004, 02:31:31 am ---if src/drawgfx.c:


change
===============================================
static int crosshair_enable=1;

void drawgfx_toggle_crosshair(void)
{
   crosshair_enable^=1;
}

void draw_crosshair(struct mame_bitmap *bitmap,int x,int y,const struct rectangle *clip)
{
   unsigned short black,white;
   int i;

   if (!crosshair_enable)
===============================================
to
===============================================
/* static int crosshair_enable=1; */

void drawgfx_toggle_crosshair(void)
{
   crosshair_enable^=1;
}

void draw_crosshair(struct mame_bitmap *bitmap,int x,int y,const struct rectangle *clip)
{
   unsigned short black,white;
   int i;

   if (!crosshair_enable)
================================================

In src/mame.h:
add

int   crosshairs;

In /src/windows/config.c:
Add

{ "crosshairs", "ch", rc_bool, &options.crosshairs, "0", 0, 0, NULL, "draw crosshairs for lightgun games" },

--- End quote ---
Okay, now it'll work. The "crosshair"s should have been "crosshair_enable"s.
Howard_Casto:
actually no, it should be crosshairs

if you notice the only instance of "crosshair_enable" in the original source is locally in drawgfx

I commented that out and replaced all instances with the global variable crosshairs, to match with the new command line switch


oops the wrong code was pasted in, sorry


on second glance, however i'm not actually passing the new switch to anything.... the easiest solution is to remove the new global "crosshairs" and instead read and write to options.crosshairs

The code posted above has been fixed in the original post.
TheGatesofBill:
Hmm... still doesn't compile.
Lilwolf:
btw..

wouldn't it be nice to have the player 1 and player 2 seperated?  

something I was always annoyed with.. but once you have a real gun (assuming actlabs guns are considered real)..  It doesn't matter.

but others might like it.
Navigation
Message Index
Next page
Previous page

Go to full version