Build Your Own Arcade Controls Forum

Main => Software Forum => Topic started by: Ginsu Victim on September 29, 2009, 03:37:34 pm

Title: Changing crosshairs in a pre-.131 MAME?
Post by: Ginsu Victim on September 29, 2009, 03:37:34 pm
To my knowledge, Mr Do's artwork page has had custom crosshairs since before .131 added the crsshair directory, so how does someone using .127 use custom crosshairs? I'm not happy with the default.

Thanks.
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: Ginsu Victim on September 30, 2009, 08:29:18 am
So maybe I'm wrong and you can't do it. Bumping this up for anyone that might know...
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: u_rebelscum on October 02, 2009, 01:48:17 pm
Hmm, let me look into it...

Okay, 0.130, you could do "cross#.png", with the # the player number... (DLing 0.127) ...
0.127 is the same:

      /* first try to load a bitmap for the crosshair */
      sprintf(filename, "cross%d.png", player);
      global.bitmap[player] = render_load_png(NULL, filename, NULL, NULL);

      /* if that didn't work, use the built-in one */
      if (global.bitmap[player] == NULL)


I'm not sure what folder cross1.png, etc need to be in, though.  Probably the mame root folder.  There is something about a crosshair max of "100"; I'm not sure if that's a 10x10 size limit or what.  And this is all from looking at the source, so grain of salt and all.
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: Ginsu Victim on October 02, 2009, 02:11:23 pm
I appreciate the help and the fact that you dug a little just to answer my question. At one point there was more info on this, but I didn't have a use for it at the time, so I paid no attention.

We'll see what happens.

Thanks.
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: u_rebelscum on October 02, 2009, 05:21:13 pm
No problem.  I faintly remembered  something on crosshairs, but I've misremembered stuff before.  And with mame a moving target, it's hard to find valid info on older versions of mame if it's not in the source.  In fact, I spent less time looking at the source than trying to google for crosshairs.

Let us know how it goes. :cheers:
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: Ginsu Victim on October 02, 2009, 05:24:52 pm
I think I speak for everyone in saying how much we all appreciate your contribution to this forum. You go above and beyond what most would even consider.

Maybe it didn't take much digging to answer my question, but you go out of your way to answer MAME questions (in long-winded detail most of the time) more than anyone I've ever seen.
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: Ginsu Victim on October 03, 2009, 06:01:59 pm
Figured it out.

cross0.png in the Artwork folder for player 1 and cross1.png for player 2.

The size doesn't seem to matter too much. I just tried a 500x500 crosshair and it worked fine.

Edit:
Because I only have one gun, I don't want the second player crosshairs to show up, so I made a blank PNG to replace it. I have attached it below in case anyone wants it.
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: u_rebelscum on October 05, 2009, 05:58:40 pm
Figured it out.

cross0.png in the Artwork folder for player 1 and cross1.png for player 2.

Glad to hear you got it working.  (dang C array numbering showing up again)

Quote
The size doesn't seem to matter too much. I just tried a 500x500 crosshair and it worked fine.

Good to hear I was wrong.  The 100 must be just related to the internal default crosshairs, then.
Title: Re: Changing crosshairs in a pre-.131 MAME?
Post by: Ginsu Victim on October 05, 2009, 06:02:37 pm
I wouldn't have got it without your help, so thanks again.