Difference between revisions of "DataNode"
Jump to navigation
Jump to search
Ihatecompvir (talk | contribs) (initial page for DataNodes) |
m (typo) |
||
(8 intermediate revisions by 4 users not shown) | |||
Line 5: | Line 5: | ||
{| class="wikitable" | {| class="wikitable" | ||
!Name | !Name | ||
!Type | |||
!Size | !Size | ||
!Function | !Function | ||
|- | |- | ||
| | |mValue | ||
|Varies | |||
|4 bytes | |4 bytes | ||
|The value of the DataNode. | |The value of the DataNode. | ||
|- | |- | ||
| | |mType | ||
|DataType | |||
|4 bytes | |4 bytes | ||
|The type of the DataNode. | |The type of the DataNode. | ||
Line 19: | Line 22: | ||
==Types== | ==Types== | ||
Each Milo game supports a different set of types for a DataNode. The amount of types gradually increased as Milo's scripting engine became more capable over the years. | Each Milo game supports a different set of types for a DataNode. The amount of types gradually increased as Milo's scripting engine became more capable over the years. | ||
NOTE: in code, kDataInteger and kDataUnhandled are swapped. This is presumably to allow the engine to check whether or not a node is typed with a simple "is nonzero" check. | |||
===Rock Band 3=== | ===Rock Band 3=== | ||
Line 27: | Line 31: | ||
!Description | !Description | ||
|- | |- | ||
| | |kDataInteger | ||
|0x0 | |0x0 | ||
|An integer value. | |An integer value. | ||
|- | |- | ||
| | |kDataFloat | ||
|0x1 | |0x1 | ||
|A 32-bit floating point value. | |A 32-bit floating point value. | ||
|- | |- | ||
| | |kDataVar | ||
|0x2 | |0x2 | ||
|A generic variable. | |A generic variable. Prefixed by <code>$</code> in DTA. | ||
|- | |- | ||
| | |kDataFunc | ||
|0x3 | |0x3 | ||
|A | |A [[DataFuncs|DataFunc]] declaration. | ||
|- | |- | ||
| | |kDataObject | ||
|0x4 | |0x4 | ||
|A pointer to some sort of object. | |A pointer to some sort of object. | ||
|- | |- | ||
| | |kDataSymbol | ||
|0x5 | |0x5 | ||
|A pointer to a [[Symbol]]. | |A pointer to a [[Symbol]]. | ||
|- | |- | ||
| | |kDataUnhandled | ||
|0x6 | |0x6 | ||
|No value. | |No value. | ||
|- | |- | ||
| | |kDataIfdef | ||
|0x7 | |0x7 | ||
|A conditional checking for the existence of a global macro (such as _SHIP). | |A conditional checking for the existence of a global macro (such as _SHIP). | ||
|- | |- | ||
| | |kDataElse | ||
|0x8 | |0x8 | ||
|The 'else' conditional. | |The 'else' conditional. | ||
|- | |- | ||
| | |kDataEndif | ||
|0x9 | |0x9 | ||
|The 'endif' conditional. | |The 'endif' conditional. | ||
|- | |- | ||
| | |kDataArray | ||
|0x10 | |0x10 | ||
|A pointer to a [[DataArray]]. | |A pointer to a [[DataArray]]. Denoted by <code>()</code> in DTA. | ||
|- | |- | ||
| | |kDataCommand | ||
|0x11 | |0x11 | ||
| | |Executable statements/DataFunc calls. Denoted by <code>{}</code> in DTA. | ||
|- | |- | ||
| | |kDataString | ||
|0x12 | |0x12 | ||
|A string value. | |A string value. Usually delimited by single or double quotes in DTA. | ||
|- | |- | ||
| | |kDataProperty | ||
|0x13 | |0x13 | ||
|A pointer to the property of an object. | |A pointer to the property of an object. Denoted by <code>[]</code> in DTA. | ||
|- | |- | ||
| | |kDataGlob | ||
|0x14 | |0x14 | ||
| | |A length of binary data. Effectively unused. | ||
|- | |- | ||
| | |kDataDefine | ||
|0x20 | |0x20 | ||
|A Macro definition. | |A Macro definition. | ||
|- | |- | ||
| | |kDataInclude | ||
|0x21 | |0x21 | ||
|A marker indicating that another DTA/DTB should be included in the current file. | |A marker indicating that another DTA/DTB should be included in the current file. | ||
|- | |- | ||
| | |kDataMerge | ||
|0x22 | |0x22 | ||
|A marker indicating that another DTA/DTB should be merged into the current file. | |A marker indicating that another DTA/DTB should be merged into the current file. Merging is done by bringing in array elements that are not already defined. | ||
|- | |- | ||
| | |kDataIfndef | ||
|0x23 | |0x23 | ||
|A conditional checking for the non-existence of a global macro (such as _SHIP). | |A conditional checking for the non-existence of a global macro (such as _SHIP). | ||
|- | |- | ||
| | |kDataAutorun | ||
|0x24 | |0x24 | ||
| | |Automatically executes a kDataCommand upon loading. | ||
|- | |- | ||
| | |kDataUndef | ||
|0x25 | |0x25 | ||
| | |Undefines a defined macro. | ||
|} | |} |
Latest revision as of 18:37, 9 October 2024
An object used internally by the Milo engine to represent a value of some type. Arrays of DataNodes are called DataArrays. In a DTB file, the type is explicitly stored, but in DTA files, it is guessed based on the syntax and keywords.
Structure
Name | Type | Size | Function |
---|---|---|---|
mValue | Varies | 4 bytes | The value of the DataNode. |
mType | DataType | 4 bytes | The type of the DataNode. |
Types
Each Milo game supports a different set of types for a DataNode. The amount of types gradually increased as Milo's scripting engine became more capable over the years. NOTE: in code, kDataInteger and kDataUnhandled are swapped. This is presumably to allow the engine to check whether or not a node is typed with a simple "is nonzero" check.
Rock Band 3
Type Name | Value | Description |
---|---|---|
kDataInteger | 0x0 | An integer value. |
kDataFloat | 0x1 | A 32-bit floating point value. |
kDataVar | 0x2 | A generic variable. Prefixed by $ in DTA.
|
kDataFunc | 0x3 | A DataFunc declaration. |
kDataObject | 0x4 | A pointer to some sort of object. |
kDataSymbol | 0x5 | A pointer to a Symbol. |
kDataUnhandled | 0x6 | No value. |
kDataIfdef | 0x7 | A conditional checking for the existence of a global macro (such as _SHIP). |
kDataElse | 0x8 | The 'else' conditional. |
kDataEndif | 0x9 | The 'endif' conditional. |
kDataArray | 0x10 | A pointer to a DataArray. Denoted by () in DTA.
|
kDataCommand | 0x11 | Executable statements/DataFunc calls. Denoted by {} in DTA.
|
kDataString | 0x12 | A string value. Usually delimited by single or double quotes in DTA. |
kDataProperty | 0x13 | A pointer to the property of an object. Denoted by [] in DTA.
|
kDataGlob | 0x14 | A length of binary data. Effectively unused. |
kDataDefine | 0x20 | A Macro definition. |
kDataInclude | 0x21 | A marker indicating that another DTA/DTB should be included in the current file. |
kDataMerge | 0x22 | A marker indicating that another DTA/DTB should be merged into the current file. Merging is done by bringing in array elements that are not already defined. |
kDataIfndef | 0x23 | A conditional checking for the non-existence of a global macro (such as _SHIP). |
kDataAutorun | 0x24 | Automatically executes a kDataCommand upon loading. |
kDataUndef | 0x25 | Undefines a defined macro. |