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?