Skip to content

Commit 34a31ac

Browse files
committed
Fixed various issues in internal layouts:
* plugins/layout: Log script errors at warning level rather than verbose level. * microtouch.lay, pntnpuzl.lay: Improved pointer mapping code. * Reordered all layouts to place views after element and group definitions and scripts last. This matches how layout files are interpreted by MAME. * Fixed various errors identified by validating layout files against an XSD schema.
1 parent 07b62ad commit 34a31ac

28 files changed

+205
-169
lines changed

plugins/layout/init.lua

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ function layout.startplugin()
5151
table = table }
5252
local script, err = load(script, script, "t", env)
5353
if not script then
54-
emu.print_verbose("error loading layout script " .. err)
54+
emu.print_warning("error loading layout script " .. err)
5555
return
5656
end
5757
local hooks = script()

src/mame/layout/babydad.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ license:CC0-1.0
106106
</element>
107107

108108
<element name="L11" defstate="0">
109-
<rect STATE="1">
109+
<rect state="1">
110110
<color red="0.80" green="0.80" blue="0.0" />
111111
</rect>
112112
</element>

src/mame/layout/babypkr.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ license:CC0-1.0
133133
</element>
134134

135135
<element name="L11" defstate="0">
136-
<rect STATE="1">
136+
<rect state="1">
137137
<color red="0.80" green="0.80" blue="0.0" />
138138
</rect>
139139
</element>

src/mame/layout/bfm_sc4.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ license:CC0-1.0
5252

5353
<element name="SteppersReel2" defstate="0">
5454
<reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
55-
"<color red="1.0" green="1.0" blue="1.0" />
55+
<color red="1.0" green="1.0" blue="1.0" />
5656
<bounds x="0" y="0" width="1" height="1" />
5757
</reel>
5858
</element>

src/mame/layout/bfm_sc5.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ license:CC0-1.0
5252

5353
<element name="SteppersReel2" defstate="0">
5454
<reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
55-
"<color red="1.0" green="1.0" blue="1.0" />
55+
<color red="1.0" green="1.0" blue="1.0" />
5656
<bounds x="0" y="0" width="1" height="1" />
5757
</reel>
5858
</element>

src/mame/layout/bfm_sc5_gu96x8.lay

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ license:CC0
5252

5353
<element name="SteppersReel2" defstate="0">
5454
<reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
55-
"<color red="1.0" green="1.0" blue="1.0" />
55+
<color red="1.0" green="1.0" blue="1.0" />
5656
<bounds x="0" y="0" width="1" height="1" />
5757
</reel>
5858
</element>
@@ -254,7 +254,7 @@ license:CC0
254254
<param name="p" start="0" increment="40"/>
255255
<param name="b" start="180" increment="22"/>
256256
<repeat count="5">
257-
<param name="s" start="~p~" incrment="8"/>
257+
<param name="s" start="~p~" increment="8"/>
258258
<param name="x" start="~b~" increment="4"/>
259259
<repeat count="8">
260260
<param name="n" start="~s~" increment="1"/>
@@ -270,7 +270,7 @@ license:CC0
270270
<!-- the rest of the elements tend to be used for 7-segs
271271
so render them as both -->
272272
<repeat count="12">
273-
<param name="s" start="160" incrment="8"/>
273+
<param name="s" start="160" increment="8"/>
274274
<param name="x" start="280" increment="4"/>
275275
<repeat count="8">
276276
<param name="n" start="~s~" increment="1"/>

src/mame/layout/bigtrak.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ authors:hap
5050

5151
<element ref="text_in"><bounds x="1" y="27" width="10" height="4" /></element>
5252
<element ref="text_dash"><bounds x="10" y="27" width="4" height="4" /></element>
53-
<element ref="ind_r" inputtag="IN.6" inputmask="0x04">><bounds x="13" y="27.8" width="3" height="3" /></element>
53+
<element ref="ind_r" inputtag="IN.6" inputmask="0x04"><bounds x="13" y="27.8" width="3" height="3" /></element>
5454

5555
<element ref="text_out"><bounds x="1" y="31" width="10" height="4" /></element>
5656
<element ref="text_dash"><bounds x="10" y="31" width="4" height="4" /></element>

src/mame/layout/dx100.lay

+2-2
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ license:CC0-1.0
4747

4848
<element name="button-text-play">
4949
<rect></rect>
50-
<text align="0" valign="0" string="PLAY">
50+
<text align="0" string="PLAY">
5151
<color red="0.15" green="0.15" blue="0.15" />
5252
</text>
5353
</element>
@@ -953,7 +953,7 @@ license:CC0-1.0
953953
<bounds x="88" y="0" width="72" height="208" />
954954
</element>
955955
<element ref="slider-nub">
956-
<animate inputtag="AN3" inputmask="0xFF" />
956+
<animate inputtag="AN3" mask="0xff" />
957957
<bounds state="0" x="90" y="156" width="68" height="6" />
958958
<bounds state="255" x="90" y="44" width="68" height="6" />
959959
</element>

src/mame/layout/eacc.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Electronics Australia Car Computer
1313
<element name="red_led">
1414
<disk state="0"><color red="1.0" green="0.0" blue="0.0" /></disk>
1515
</element>
16-
<element name="red_button" state="0">
16+
<element name="red_button" defstate="0">
1717
<rect state="0"><color red="0.75" green="0.25" blue="0.25" /></rect>
1818
<rect state="1"><color red="1.0" green="0.25" blue="0.25" /></rect>
1919
</element>

src/mame/layout/ecoinf2.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ license:CC0-1.0
4444

4545
<element name="SteppersReel2" defstate="0">
4646
<reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
47-
"<color red="1.0" green="1.0" blue="1.0" />
47+
<color red="1.0" green="1.0" blue="1.0" />
4848
<bounds x="0" y="0" width="1" height="1" />
4949
</reel>
5050
</element>

src/mame/layout/ecoinf3.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ license:CC0-1.0
4444

4545
<element name="SteppersReel2" defstate="0">
4646
<reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
47-
"<color red="1.0" green="1.0" blue="1.0" />
47+
<color red="1.0" green="1.0" blue="1.0" />
4848
<bounds x="0" y="0" width="1" height="1" />
4949
</reel>
5050
</element>

src/mame/layout/ecoinfr.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ license:CC0-1.0
2828

2929
<element name="SteppersReel2" defstate="0">
3030
<reel stateoffset="682" symbollist="Fruit1,Fruit2,Fruit3,Fruit4,Fruit5,Fruit6,Fruit7,Fruit8,Fruit9,Fruit10,Fruit11,Fruit12,Fruit13,Fruit14,Fruit15,Fruit16">
31-
"<color red="1.0" green="1.0" blue="1.0" />
31+
<color red="1.0" green="1.0" blue="1.0" />
3232
<bounds x="0" y="0" width="1" height="1" />
3333
</reel>
3434
</element>

src/mame/layout/enmirage.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ copyright-holders:tim lindner
103103
<element ref="button_white"><bounds x="281" y="82" width="659" height="6" /></element>
104104
<element ref="button_white"><bounds x="281" y="175" width="659" height="6" /></element>
105105
<element ref="button_white"><bounds x="34" y="268" width="649" height="6" /></element>
106-
<element ref="button_white"><bounds x="0" y="361" width="939" height="6" /></element>11
106+
<element ref="button_white"><bounds x="0" y="361" width="939" height="6" /></element>
107107
<element ref="button_white"><bounds x="38" y="367" width="155" height="6" /></element>
108108
<element ref="button_white"><bounds x="282" y="367" width="230" height="6" /></element>
109109
<element ref="button_white"><bounds x="597" y="367" width="44" height="6" /></element>

src/mame/layout/fb01.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ license:CC0-1.0
130130
<bounds x="303" y="34" width="45" height="28" />
131131
</element>
132132

133-
<element nmae="data_entry_yes_1" ref="data_entry">
133+
<element name="data_entry_yes_1" ref="data_entry">
134134
<bounds left="350" right="399" top="0" bottom="15" />
135135
</element>
136136
<element name="data_entry_yes_2" ref="yes">

src/mame/layout/guab.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ license:CC0-1.0
8989
</element>
9090
<element name="led_23" ref="led">
9191
<bounds x="470" y="610" width="10" height="10" />
92-
</element>a
92+
</element>
9393
<element name="led_24" ref="led">
9494
<bounds x="10" y="630" width="10" height="10" />
9595
</element>

src/mame/layout/hp3478a.lay

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ loosely based on tranz330.lay
2828

2929
<element name="hl" defstate="0">
3030
<rect state="1">
31-
<color red="0.0" green="0.0" blue="0.5" alphe="0.2" />
31+
<color red="0.0" green="0.0" blue="0.5" alpha="0.2" />
3232
</rect>
3333
</element>
3434

src/mame/layout/interpro.lay

+6-6
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,12 @@ TODO
1010
- monitor bezels
1111
-->
1212
<mamelayout version="2">
13+
<element name="digit" defstate="0">
14+
<led7seg>
15+
<color red="1.0" green="0.0" blue="0.0" />
16+
</led7seg>
17+
</element>
18+
1319
<view name="Graphics 0">
1420
<screen index="0">
1521
<bounds x="0" y="0" width="1184" height="884" />
@@ -22,12 +28,6 @@ TODO
2228
</screen>
2329
</view>
2430

25-
<element name="digit" defstate="0">
26-
<led7seg>
27-
<color red="1.0" green="0.0" blue="0.0" />
28-
</led7seg>
29-
</element>
30-
3131
<view name="Terminal">
3232
<screen index="2">
3333
<bounds x="0" y="0" width="800" height="600" />

src/mame/layout/m4andybt.lay

+13-13
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@
355355
<color red="0.12" green="0.00" blue="0.00"/>
356356
</rect>
357357
</element>
358-
<element name="lamp_162_1" defstate="0" inputtag="AUX2" inputmask="0x80">
358+
<element name="lamp_162_1" defstate="0">
359359
<rect state="1">
360360
<color red="1.00" green="0.00" blue="0.00"/>
361361
</rect>
@@ -535,7 +535,7 @@
535535
<color red="0.06" green="0.06" blue="0.12"/>
536536
</rect>
537537
</element>
538-
<element name="lamp_48_1" defstate="0" inputtag="BLACK2" inputmask="0x20">
538+
<element name="lamp_48_1" defstate="0">
539539
<rect state="1">
540540
<color red="0.50" green="0.50" blue="1.00"/>
541541
</rect>
@@ -1575,7 +1575,7 @@
15751575
<color red="0.12" green="0.12" blue="0.06"/>
15761576
</rect>
15771577
</element>
1578-
<element name="lamp_22_1" defstate="0" inputtag="BLACK2" inputmask="0x80">
1578+
<element name="lamp_22_1" defstate="0">
15791579
<rect state="1">
15801580
<color red="1.00" green="1.00" blue="0.50"/>
15811581
</rect>
@@ -3151,7 +3151,7 @@
31513151
<color red="0.12" green="0.00" blue="0.00"/>
31523152
</rect>
31533153
</element>
3154-
<element name="colour_button_196" inputtag="BLACK1" inputmask="0x01">
3154+
<element name="colour_button_196">
31553155
<rect state="1">
31563156
<color red="1.00" green="0.00" blue="0.00"/>
31573157
</rect>
@@ -3179,7 +3179,7 @@
31793179
<color red="0.12" green="0.00" blue="0.00"/>
31803180
</rect>
31813181
</element>
3182-
<element name="colour_button_197" inputtag="BLACK2" inputmask="0x02">
3182+
<element name="colour_button_197">
31833183
<rect state="1">
31843184
<color red="1.00" green="0.00" blue="0.00"/>
31853185
</rect>
@@ -3203,7 +3203,7 @@
32033203
<color red="0.12" green="0.06" blue="0.00"/>
32043204
</rect>
32053205
</element>
3206-
<element name="colour_button_198" inputtag="BLACK2" inputmask="0x01">
3206+
<element name="colour_button_198">
32073207
<rect state="1">
32083208
<color red="1.00" green="0.50" blue="0.00"/>
32093209
</rect>
@@ -3223,7 +3223,7 @@
32233223
<color red="0.12" green="0.00" blue="0.00"/>
32243224
</rect>
32253225
</element>
3226-
<element name="colour_button_199" inputtag="BLACK2" inputmask="0x04">
3226+
<element name="colour_button_199">
32273227
<rect state="1">
32283228
<color red="1.00" green="0.00" blue="0.00"/>
32293229
</rect>
@@ -3247,7 +3247,7 @@
32473247
<color red="0.12" green="0.00" blue="0.00"/>
32483248
</rect>
32493249
</element>
3250-
<element name="colour_button_200" inputtag="BLACK2" inputmask="0x08">
3250+
<element name="colour_button_200">
32513251
<rect state="1">
32523252
<color red="1.00" green="0.00" blue="0.00"/>
32533253
</rect>
@@ -3271,7 +3271,7 @@
32713271
<color red="0.12" green="0.00" blue="0.00"/>
32723272
</rect>
32733273
</element>
3274-
<element name="colour_button_201" inputtag="BLACK2" inputmask="0x10">
3274+
<element name="colour_button_201">
32753275
<rect state="1">
32763276
<color red="1.00" green="0.00" blue="0.00"/>
32773277
</rect>
@@ -3315,7 +3315,7 @@
33153315
<color red="0.12" green="0.12" blue="0.00"/>
33163316
</rect>
33173317
</element>
3318-
<element name="colour_button_203" inputtag="BLACK2" inputmask="0x40">
3318+
<element name="colour_button_203">
33193319
<rect state="1">
33203320
<color red="1.00" green="1.00" blue="0.00"/>
33213321
</rect>
@@ -3732,7 +3732,7 @@
37323732
<element name="lamp162" ref="lamp_162_1_border" state="0">
37333733
<bounds x="732" y="3" width="56" height="24"/>
37343734
</element>
3735-
<element name="lamp162" ref="lamp_162_1" state="0">
3735+
<element name="lamp162" ref="lamp_162_1" state="0" inputtag="AUX2" inputmask="0x80">
37363736
<bounds x="734" y="5" width="52" height="20"/>
37373737
</element>
37383738
<element name="lamp156" ref="lamp_156_1_border" state="0">
@@ -3786,7 +3786,7 @@
37863786
<element name="lamp48" ref="lamp_48_1_border" state="0">
37873787
<bounds x="153" y="533" width="64" height="32"/>
37883788
</element>
3789-
<element name="lamp48" ref="lamp_48_1" state="0">
3789+
<element name="lamp48" ref="lamp_48_1" state="0" inputtag="BLACK2" inputmask="0x20">
37903790
<bounds x="155" y="535" width="60" height="28"/>
37913791
</element>
37923792
<element name="lamp204" ref="lamp_204_1_border" state="0">
@@ -4074,7 +4074,7 @@
40744074
<element name="lamp22" ref="lamp_22_1_border" state="0">
40754075
<bounds x="103" y="347" width="56" height="32"/>
40764076
</element>
4077-
<element name="lamp22" ref="lamp_22_1" state="0">
4077+
<element name="lamp22" ref="lamp_22_1" state="0" inputtag="BLACK2" inputmask="0x80">
40784078
<bounds x="105" y="349" width="52" height="28"/>
40794079
</element>
40804080
<element name="lamp123" ref="lamp_123_1_border" state="0">

0 commit comments

Comments
 (0)