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: MAMELAY Plus rendlay.cpp  (Read 2336 times)

0 Members and 1 Guest are viewing this topic.

bionictoothpick

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:December 16, 2024, 03:32:49 pm
  • Yes, I still play Maze Craze.
MAMELAY Plus rendlay.cpp
« on: April 02, 2016, 01:50:16 pm »
This code worked on rendlay.c, but with the move to rendlay.cpp it no longer works.

// Tapule & LordHiryu mod ----------------------------------------------------------
+      // Use %dfX as file name to let the layout use arwork/definableX/gamename.png as image
+      if(m_imagefile[0][0] == '%' && m_imagefile[0][1] == 'd' && m_imagefile[0][2] == 'f'){
+         const char *l_img = xml_get_attribute_string_with_subst(machine, compnode, "file", "");
+         int l_definable = 0;
+         char l_temp[100];
+         
+         sscanf(&l_img[3], "%d", &l_definable);
+         sprintf(l_temp, "definable%d", l_definable);
+         m_imagefile[0].cpy(l_temp).cat(PATH_SEPARATOR).cat(machine.basename()).cat(".png");
+         // Reset dirname to force arwork folder as default for the definables
+         m_dirname.reset();
+      }
+      // Tapule & LordHiryu mod ----------------------------------------------------------
+
It's from mamelay plus. Anyone know how to make it work with render.cpp?
« Last Edit: April 02, 2016, 02:10:59 pm by bionictoothpick »

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Re: MAMELAY Plus rendlay.cpp
« Reply #1 on: April 04, 2016, 11:30:24 am »
maybe?
Code: [Select]
if (m_imagefile[0].compare(0, 3, "%df") == 0)
{
    m_imagefile[0].replace(0, 3, "definable");
    m_imagefile[0] += PATH_SEPARATOR;
    m_imagefile[0] += machine.basename();
    m_imagefile[0] += ".png";
}
« Last Edit: April 04, 2016, 12:53:49 pm by h0tw1r3 »

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Re: MAMELAY Plus rendlay.cpp
« Reply #2 on: April 04, 2016, 01:02:48 pm »
Bored, in bed, sick... Updated patch for 0.172:

https://playground.btolab.com/sandbox/kb/arcade/emulation/mame/mods/
« Last Edit: May 13, 2016, 03:30:14 am by h0tw1r3 »

bionictoothpick

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 11
  • Last login:December 16, 2024, 03:32:49 pm
  • Yes, I still play Maze Craze.
Re: MAMELAY Plus rendlay.cpp
« Reply #3 on: April 04, 2016, 06:56:57 pm »
As a side not, I have to do diff/patch files manually because I don't have a working patch.exe tool I am willing to read about it, but seem to get conflicting instructions via google....is there a definitive guide, or at least one place where if I stay with those instructions someone will be good to go?

I'm not interested in everything being automated...
« Last Edit: April 06, 2016, 07:21:15 am by bionictoothpick »

h0tw1r3

  • Trade Count: (0)
  • Full Member
  • ***
  • Offline Offline
  • Posts: 47
  • Last login:May 19, 2023, 09:50:54 pm
  • Git-R-Done
Re: MAMELAY Plus rendlay.cpp
« Reply #4 on: April 11, 2016, 12:41:32 pm »
For windows, I highly recommend following the official instructions.

http://mamedev.org/tools/

To apply any patches I post try:

Code: [Select]
git apply <patchname>.patch
If that doesn't work, this usually does:

Code: [Select]
git apply --recount --inaccurate-eof --ignore-whitespace <patchname>.patch
BTW, I moved the patches to: https://playground.btolab.com/sandbox/kb/arcade/emulation/mame/mods/
« Last Edit: May 13, 2016, 03:29:45 am by h0tw1r3 »