mirror of
https://github.com/holub/mame
synced 2025-05-20 20:58:51 +03:00
info.c: added screen tags to xml output, so that it is possible to easily identify which screens depend
on optional devices (mostly of use in MESS, for its slot options, but eventually handy for PC-based arcades too) [Fabio Priuli]
This commit is contained in:
parent
0f76b1e0f6
commit
47741486b8
@ -105,6 +105,7 @@ const char info_xml_creator::s_dtd_string[] =
|
||||
"\t\t\t<!ATTLIST chip type (cpu|audio) #REQUIRED>\n"
|
||||
"\t\t\t<!ATTLIST chip clock CDATA #IMPLIED>\n"
|
||||
"\t\t<!ELEMENT display EMPTY>\n"
|
||||
"\t\t\t<!ATTLIST display tag CDATA #IMPLIED>\n"
|
||||
"\t\t\t<!ATTLIST display type (raster|vector|lcd|unknown) #REQUIRED>\n"
|
||||
"\t\t\t<!ATTLIST display rotate (0|90|180|270) #REQUIRED>\n"
|
||||
"\t\t\t<!ATTLIST display flipx (yes|no) \"no\">\n"
|
||||
@ -318,7 +319,7 @@ void info_xml_creator::output_one()
|
||||
output_device_roms();
|
||||
output_sample();
|
||||
output_chips(m_drivlist.config().root_device(), "");
|
||||
output_display(m_drivlist.config().root_device());
|
||||
output_display(m_drivlist.config().root_device(), "");
|
||||
output_sound(m_drivlist.config().root_device());
|
||||
output_input(portlist);
|
||||
output_switches(portlist, "", IPT_DIPSWITCH, "dipswitch", "dipvalue");
|
||||
@ -372,7 +373,7 @@ void info_xml_creator::output_one_device(device_t &device, const char *devtag)
|
||||
|
||||
output_rom(device);
|
||||
output_chips(device, devtag);
|
||||
output_display(device);
|
||||
output_display(device, devtag);
|
||||
if (has_speaker)
|
||||
output_sound(device);
|
||||
if (has_input)
|
||||
@ -679,13 +680,19 @@ void info_xml_creator::output_chips(device_t &device, const char *root_tag)
|
||||
// displays
|
||||
//-------------------------------------------------
|
||||
|
||||
void info_xml_creator::output_display(device_t &device)
|
||||
void info_xml_creator::output_display(device_t &device, const char *root_tag)
|
||||
{
|
||||
// iterate over screens
|
||||
screen_device_iterator iter(device);
|
||||
for (const screen_device *screendev = iter.first(); screendev != NULL; screendev = iter.next())
|
||||
{
|
||||
if (strcmp(screendev->tag(), device.tag()))
|
||||
{
|
||||
astring newtag(screendev->tag()), oldtag(":");
|
||||
newtag.substr(newtag.find(oldtag.cat(root_tag)) + oldtag.len());
|
||||
|
||||
fprintf(m_output, "\t\t<display");
|
||||
fprintf(m_output, " tag=\"%s\"", xml_normalize_string(newtag));
|
||||
|
||||
switch (screendev->screen_type())
|
||||
{
|
||||
@ -751,6 +758,7 @@ void info_xml_creator::output_display(device_t &device)
|
||||
}
|
||||
fprintf(m_output, " />\n");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -68,7 +68,7 @@ private:
|
||||
void output_device_roms();
|
||||
void output_sample();
|
||||
void output_chips(device_t &device, const char *root_tag);
|
||||
void output_display(device_t &device);
|
||||
void output_display(device_t &device, const char *root_tag);
|
||||
void output_sound(device_t &device);
|
||||
void output_input(const ioport_list &portlist);
|
||||
void output_switches(const ioport_list &portlist, const char *root_tag, int type, const char *outertag, const char *innertag);
|
||||
|
Loading…
Reference in New Issue
Block a user