Build Your Own Arcade Controls Forum
Main => Lightguns => Topic started by: Magnet_Eye on April 17, 2004, 09:28:11 pm
-
I know you can hit F1 to hide the crosshairs, but can you permanently hide them instead of having to hit F1 everytime?
-
Not currently... but come to think of it, it would be easy to add a command line switch in mame. I'll look into it. :)
-
Not currently... but come to think of it, it would be easy to add a command line switch in mame. I'll look into it. :)
cool. let me know what you come up with. ;)
-
ok this should work, I haven't tested it yet as i'm waiting for the next official mame build before I recompile (hate dealing with diff files)
-
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)
{
options.crosshairs^=1;
}
void draw_crosshair(struct mame_bitmap *bitmap,int x,int y,const struct rectangle *clip)
{
unsigned short black,white;
int i;
if (!options.crosshairs)
================================================
In /src/windows/config.c:
Add
{ "crosshairs", "ch", rc_bool, &options.crosshairs, "0", 0, 0, NULL, "draw crosshairs for lightgun games" },
-
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.
-
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" },
Okay, now it'll work. The "crosshair"s should have been "crosshair_enable"s.
-
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.
-
Hmm... still doesn't compile.
-
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.
-
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.
It would, but the way drawcrosshairs is implemented you'd have to change the source to every single game that uses crosshairs. So I'm not going to figure it out anyway. ;)