XML:PSpc: Difference between revisions
Paradox-01 (talk | contribs) m (errrr... wiki image behavior ... no me gusta) |
m (copy-edit) |
||
Line 1: | Line 1: | ||
{{XML_File_Header | type=PSpc | prev=OSBD | next=PSpL | name=Part Specification }} | {{XML_File_Header | type=PSpc | prev=OSBD | next=PSpL | name=Part Specification }} | ||
== | ==General information== | ||
* The | * The XML on this page is compatible with OniSplit '''v0.9.61.0'''. | ||
* This | * This resource uses the concept of the [[wp:9-slice scaling|nine-slice GUI]] to construct [[IGPG]]s (in-game pages), which are used by [[XML:DPge|DPges]], [[XML:HPge|HPges]], [[XML:IPge|IPges]], [[XML:OPge|OPges]], and [[XML:TxtC|TxtCs]]. | ||
* You could | * You could attempt to simulate image alignment by using the image you want displayed as a corner, then supplying a transparent texture for the other components. | ||
* | * Please note that animated TXMPs doesn't work in a PSpc. | ||
==XML structure== | |||
{|border=1 cellspacing=0 cellpadding=2 style="border-style:solid; border-collapse:collapse; empty-cells:show; background-color:#f9f9f9;" | |||
{|border= | |width=20px align=center|1 | ||
|width=20px align=center|4 | |||
|width=20px align=center|7 | |||
| | |||
| | |||
| | |||
|- | |- | ||
| | |align=center|2 | ||
| | |align=center|5 | ||
| | |align=center|8 | ||
|- | |- | ||
| | |align=center|3 | ||
| | |align=center|6 | ||
| | |align=center|9 | ||
|} | |} | ||
There are 9 <PSpcPoint> tags under <TopLeft> and nine <PSpcPoint>s under <RightBottom>. Confusingly, the ''n''th <PSpcPoint> tag under <TopLeft> and the ''n''th <PSpcPoint> under <RightBottom> belong together, so you should think of the entries under <TopLeft> and <RightBottom> as comprising pairs of points which define a single tile out of nine. The order of the tiles is top to bottom, left to right. | |||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni> | <Oni> | ||
Line 50: | Line 45: | ||
</Oni> | </Oni> | ||
==Example== | |||
TXMPh_19 is the only image appearing in TxtClevel_19a, but a PSpc divides it into 3 parts in order to stretch it across the top of the page. Each part is framed by the pixel coordinates in the XML below. As always with nine-slice tiling, the corners do not stretch, and the border tiles and the center tile do. Note that only parts 1, 4, and 7 are used in the following PSpc. | |||
=== | {| border=0 cellspacing=20 cellpadding=0 | ||
|[[Image:PSpc_original.png|thumb|TXMPh_19]] | |||
[[Image:PSpc_color_indicated.png|thumb|Color-coded version: the bluish half is tile 1, the single line of pixels in the center is tile 4 (this gets stretched horizontally), and the orange half is tile 7.]] | |||
| align=center | | |||
Coordinates of 1: {0, 0} to {64, 32}<br> | |||
{ | Coordinates of 4: {64, 0} to {64, 32}<br> | ||
Coordinates of 7: {65, 0} to {128, 32}<br> | |||
which produces: | |||
| | | | ||
[[Image:PSpc_parts_ingame.png|right|thumb]] | [[Image:PSpc_parts_ingame.png|right|thumb]] | ||
|} | |} | ||
<?xml version="1.0" encoding="utf-8"?> | <?xml version="1.0" encoding="utf-8"?> | ||
<Oni> | <Oni> |
Revision as of 19:17, 25 March 2021
PSpc : Part Specification | ||
---|---|---|
XML
OSBD << Other file types >> PSpL |
General information
- The XML on this page is compatible with OniSplit v0.9.61.0.
- This resource uses the concept of the nine-slice GUI to construct IGPGs (in-game pages), which are used by DPges, HPges, IPges, OPges, and TxtCs.
- You could attempt to simulate image alignment by using the image you want displayed as a corner, then supplying a transparent texture for the other components.
- Please note that animated TXMPs doesn't work in a PSpc.
XML structure
1 | 4 | 7 |
2 | 5 | 8 |
3 | 6 | 9 |
There are 9 <PSpcPoint> tags under <TopLeft> and nine <PSpcPoint>s under <RightBottom>. Confusingly, the nth <PSpcPoint> tag under <TopLeft> and the nth <PSpcPoint> under <RightBottom> belong together, so you should think of the entries under <TopLeft> and <RightBottom> as comprising pairs of points which define a single tile out of nine. The order of the tiles is top to bottom, left to right.
<?xml version="1.0" encoding="utf-8"?> <Oni> <PSpc id="0"> <TopLeft> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> [...] </TopLeft> <RightBottom> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> [...] </RightBottom> <Texture>TXMP...</Texture> </PSpc> </Oni>
Example
TXMPh_19 is the only image appearing in TxtClevel_19a, but a PSpc divides it into 3 parts in order to stretch it across the top of the page. Each part is framed by the pixel coordinates in the XML below. As always with nine-slice tiling, the corners do not stretch, and the border tiles and the center tile do. Note that only parts 1, 4, and 7 are used in the following PSpc.
Coordinates of 1: {0, 0} to {64, 32} |
<?xml version="1.0" encoding="utf-8"?> <Oni> <PSpc id="0"> <LeftTop> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>64</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>65</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> </LeftTop> <RightBottom> <PSpcPoint> <X>64</X> <Y>32</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>64</X> <Y>32</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>128</X> <Y>32</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> <PSpcPoint> <X>0</X> <Y>0</Y> </PSpcPoint> </RightBottom> <Texture>TXMPh_19</Texture> </PSpc> </Oni>