RCOXML Script: Difference between revisions

From PS3 Developer wiki
Jump to navigation Jump to search
m (→‎PSP Example: have fun with it ;)
Line 16: Line 16:
This is how the script functions are triggered by the [[RCOXML Objects]], this is a '''Plane''' object that has lot of brothers in the XML hierarchy that uses the same method, every '''event:script:''' triggers a different function from the [[VSMX]] file
This is how the script functions are triggered by the [[RCOXML Objects]], this is a '''Plane''' object that has lot of brothers in the XML hierarchy that uses the same method, every '''event:script:''' triggers a different function from the [[VSMX]] file
{{Boxcode|content=<syntaxhighlight lang="xml">
{{Boxcode|content=<syntaxhighlight lang="xml">
<Plane name="jump_button_plane" stdPositionX="9" stdPositionY="-182" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="0" stdSizeX="62" stdSizeY="13" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x11" stdOnInit="nothing" planeImage="image:tex_type_a" planeResizeMode="0x0">
<ObjectTree>
<Button name="jump_button" stdPositionX="0" stdPositionY="0" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1" stdSizeX="62" stdSizeY="13" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x11" stdOnInit="event:native:/OnInitPage500Button" buttonImage="nothing" buttonShadow="nothing" buttonFocus="image:tex_type_a" buttonText="nothing" buttonOnPush="event:script:/main/onPushButton" buttonOnFocusIn="event:script:/main/onFocusIn" buttonOnFocusOut="event:script:/main/onFocusOut" buttonOnFocusLeft="event:script:/main/onFocusLeft" buttonOnFocusRight="event:script:/main/onFocusRight" buttonOnFocusUp="event:script:/main/onFocusUp" buttonOnFocusDown="event:script:/main/onFocusDown" buttonOnContext="nothing" buttonUnknownInt47="0x0"></Button>
<Page name="remocon_page" pageMode="0x111" pageOnInit="event:script:/main/onInitMainPage" pageOnCancel="nothing" pageOnContext="nothing" pageOnActivate="nothing">
<Plane name="remocon_plane" stdPositionX="82" stdPositionY="136" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1" stdSizeX="149" stdSizeY="272" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x11" stdOnInit="nothing" planeImage="nothing" planeResizeMode="0x0">
<Plane name="ten_1_button_plane" stdPositionX="18" stdPositionY="-79" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="0" stdSizeX="24" stdSizeY="24" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x11" stdOnInit="nothing" planeImage="image:tex_type_d" planeResizeMode="0x0">
<Button name="ten_1_button" stdPositionX="0" stdPositionY="0" stdPositionZ="0" stdColorScaleR="1" stdColorScaleG="1" stdColorScaleB="1" stdColorScaleA="1" stdSizeX="24" stdSizeY="24" stdSizeZ="0" stdSizeScaleX="1" stdSizeScaleY="1" stdSizeScaleZ="1" stdAnchorPointMode="0x11" stdOnInit="event:native:/OnInitPage500Button" buttonImage="nothing" buttonShadow="nothing" buttonFocus="image:tex_type_d" buttonText="nothing" buttonOnPush="event:script:/main/onPushButton" buttonOnFocusIn="event:script:/main/onFocusIn" buttonOnFocusOut="event:script:/main/onFocusOut" buttonOnFocusLeft="event:script:/main/onFocusLeft" buttonOnFocusRight="event:script:/main/onFocusRight" buttonOnFocusUp="event:script:/main/onFocusUp" buttonOnFocusDown="event:script:/main/onFocusDown" buttonOnContext="nothing" buttonUnknownInt47="0x0"></Button>
</Plane>
</Plane>
</Plane>
</Page>
</ObjectTree>
</syntaxhighlight>}}
</syntaxhighlight>}}



Revision as of 09:43, 4 September 2016

Description

Only one script can be stored inside an .rco file, is indexed in the embedded RCOXML code of the .rco container under the XML element VSMXFile. See Resource Container (RCO) and RCOXML Coding

Is written in PlayStation JavaScript code, and before stored inside the .rco is compiled in VSMX format

The code contains the functions that are available to use by the RCOXML Objects that triggers events with the attribute event:script:

It never was used on any PS3 firmware, none of the PS3 .rco files contains an vsmx script, the format is inherited from PSP so is supposed to work on PS3 too

General concepts

Reference loaders

Template:RCOXML reference loaders

Example from lftv_tuner_us_en.rco PSP firmware 6.61

This is how the script functions are triggered by the RCOXML Objects, this is a Plane object that has lot of brothers in the XML hierarchy that uses the same method, every event:script: triggers a different function from the VSMX file

Code Sample

And this is what the PlayStation JavaScript functions does

Code Sample