Main Restorations Software Audio/Jukebox/MP3 Everything Else Buy/Sell/Trade
Project Announcements Monitor/Video GroovyMAME Merit/JVL Touchscreen Meet Up Retail Vendors
Driving & Racing Woodworking Software Support Forums Consoles Project Arcade Reviews
Automated Projects Artwork Frontend Support Forums Pinball Forum Discussion Old Boards
Raspberry Pi & Dev Board controls.dat Linux Miscellaneous Arcade Wiki Discussion Old Archives
Lightguns Arcade1Up Try the site in https mode Site News

Unread posts | New Replies | Recent posts | Rules | Chatroom | Wiki | File Repository | RSS | Submit news

  

Author Topic: Changing crosshairs in a pre-.131 MAME?  (Read 2840 times)

0 Members and 1 Guest are viewing this topic.

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Changing crosshairs in a pre-.131 MAME?
« 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.
« Last Edit: October 01, 2009, 12:50:40 pm by Ginsu Victim »

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #1 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...

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #2 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.
Robin
Knowledge is Power

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #3 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.
« Last Edit: October 02, 2009, 02:13:39 pm by Ginsu Victim »

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #4 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:
Robin
Knowledge is Power

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #5 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.

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #6 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.
« Last Edit: October 03, 2009, 06:29:35 pm by Ginsu Victim »

u_rebelscum

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 3633
  • Last login:April 21, 2010, 03:06:26 pm
  • You rebel scum
    • Mame:Analog+
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #7 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.
Robin
Knowledge is Power

Ginsu Victim

  • Yeah, owning a MAME cab only leads to owning real ones. MAME just isn't good enough. It's a gateway drug.
  • Trade Count: (+10)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 10092
  • Last login:June 28, 2025, 10:45:55 pm
  • Comanche, OK -- USA
Re: Changing crosshairs in a pre-.131 MAME?
« Reply #8 on: October 05, 2009, 06:02:37 pm »
I wouldn't have got it without your help, so thanks again.