src/emu/info.c
| r7375 | r7376 | |
| 818 | 818 | fprintf(out, "/>\n"); |
| 819 | 819 | } |
| 820 | 820 | |
| 821 | /*------------------------------------------------- |
| 822 | print_game_categories - print the Categories |
| 823 | settings for a system |
| 824 | -------------------------------------------------*/ |
| 821 | 825 | |
| 826 | void print_game_categories(FILE *out, const game_driver *game, const ioport_list &portlist) |
| 827 | { |
| 828 | const input_port_config *port; |
| 829 | const input_field_config *field; |
| 830 | |
| 831 | /* iterate looking for Categories */ |
| 832 | for (port = portlist.first(); port != NULL; port = port->next) |
| 833 | for (field = port->fieldlist; field != NULL; field = field->next) |
| 834 | if (field->type == IPT_CATEGORY) |
| 835 | { |
| 836 | const input_setting_config *setting; |
| 837 | |
| 838 | /* output the category name information */ |
| 839 | fprintf(out, "\t\t<category name=\"%s\">\n", xml_normalize_string(input_field_name(field))); |
| 840 | |
| 841 | /* loop over item settings */ |
| 842 | for (setting = field->settinglist; setting != NULL; setting = setting->next) |
| 843 | { |
| 844 | fprintf(out, "\t\t\t<item name=\"%s\"", xml_normalize_string(setting->name)); |
| 845 | if (setting->value == field->defvalue) |
| 846 | fprintf(out, " default=\"yes\""); |
| 847 | fprintf(out, "/>\n"); |
| 848 | } |
| 849 | |
| 850 | /* terminate the category entry */ |
| 851 | fprintf(out, "\t\t</category>\n"); |
| 852 | } |
| 853 | } |
| 854 | |
| 822 | 855 | /*------------------------------------------------- |
| 823 | 856 | print_game_info - print the XML information |
| 824 | 857 | for one particular game driver |
| r7375 | r7376 | |
| 890 | 923 | print_game_input(out, game, portlist); |
| 891 | 924 | print_game_switches(out, game, portlist); |
| 892 | 925 | print_game_configs(out, game, portlist); |
| 893 | | #ifdef MESS |
| 894 | 926 | print_game_categories(out, game, portlist); |
| 895 | | #endif /* MESS */ |
| 896 | 927 | print_game_adjusters(out, game, portlist); |
| 897 | 928 | print_game_driver(out, game, config); |
| 898 | 929 | #ifdef MESS |
| r7375 | r7376 | |
| 926 | 957 | #ifdef MESS |
| 927 | 958 | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, category*, adjuster*, driver?, device*, ramoption*)>\n" |
| 928 | 959 | #else |
| 929 | | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, adjuster*, driver?)>\n" |
| 960 | "\t<!ELEMENT " XML_TOP " (description, year?, manufacturer, biosset*, rom*, disk*, sample*, chip*, display*, sound?, input?, dipswitch*, configuration*, category*, adjuster*, driver?)>\n" |
| 930 | 961 | #endif |
| 931 | 962 | "\t\t<!ATTLIST " XML_TOP " name CDATA #REQUIRED>\n" |
| 932 | 963 | "\t\t<!ATTLIST " XML_TOP " sourcefile CDATA #IMPLIED>\n" |
| r7375 | r7376 | |
| 1015 | 1046 | "\t\t\t\t<!ATTLIST confsetting name CDATA #REQUIRED>\n" |
| 1016 | 1047 | "\t\t\t\t<!ATTLIST confsetting value CDATA #REQUIRED>\n" |
| 1017 | 1048 | "\t\t\t\t<!ATTLIST confsetting default (yes|no) \"no\">\n" |
| 1018 | | #ifdef MESS |
| 1019 | 1049 | "\t\t<!ELEMENT category (item*)>\n" |
| 1020 | 1050 | "\t\t\t<!ATTLIST category name CDATA #REQUIRED>\n" |
| 1021 | 1051 | "\t\t\t<!ELEMENT item EMPTY>\n" |
| 1022 | 1052 | "\t\t\t\t<!ATTLIST item name CDATA #REQUIRED>\n" |
| 1023 | 1053 | "\t\t\t\t<!ATTLIST item default (yes|no) \"no\">\n" |
| 1024 | | #endif |
| 1025 | 1054 | "\t\t<!ELEMENT adjuster EMPTY>\n" |
| 1026 | 1055 | "\t\t\t<!ATTLIST adjuster name CDATA #REQUIRED>\n" |
| 1027 | 1056 | "\t\t\t<!ATTLIST adjuster default CDATA #REQUIRED>\n" |
src/mess/infomess.c
| r7375 | r7376 | |
| 24 | 24 | *************************************/ |
| 25 | 25 | |
| 26 | 26 | /*------------------------------------------------- |
| 27 | | print_game_categories - print the Categories |
| 28 | | settings for a system |
| 29 | | -------------------------------------------------*/ |
| 30 | | |
| 31 | | void print_game_categories(FILE *out, const game_driver *game, const ioport_list &portlist) |
| 32 | | { |
| 33 | | const input_port_config *port; |
| 34 | | const input_field_config *field; |
| 35 | | |
| 36 | | /* iterate looking for Categories */ |
| 37 | | for (port = portlist.first(); port != NULL; port = port->next) |
| 38 | | for (field = port->fieldlist; field != NULL; field = field->next) |
| 39 | | if (field->type == IPT_CATEGORY) |
| 40 | | { |
| 41 | | const input_setting_config *setting; |
| 42 | | |
| 43 | | /* output the category name information */ |
| 44 | | fprintf(out, "\t\t<category name=\"%s\">\n", xml_normalize_string(input_field_name(field))); |
| 45 | | |
| 46 | | /* loop over item settings */ |
| 47 | | for (setting = field->settinglist; setting != NULL; setting = setting->next) |
| 48 | | { |
| 49 | | fprintf(out, "\t\t\t<item name=\"%s\"", xml_normalize_string(setting->name)); |
| 50 | | if (setting->value == field->defvalue) |
| 51 | | fprintf(out, " default=\"yes\""); |
| 52 | | fprintf(out, "/>\n"); |
| 53 | | } |
| 54 | | |
| 55 | | /* terminate the category entry */ |
| 56 | | fprintf(out, "\t\t</category>\n"); |
| 57 | | } |
| 58 | | } |
| 59 | | |
| 60 | | /*------------------------------------------------- |
| 61 | 27 | print_game_device - prints out all info on |
| 62 | 28 | MESS-specific devices |
| 63 | 29 | -------------------------------------------------*/ |