Data Types: Difference between revisions
Content added Content deleted
Battlepedia>Igorseabra4 (Created page with "==Basic types== {| class="wikitable" |+ ! Type ! Description |- | int, int32 || 32-bit signed integer |- | uint, int32 || 32-bit unsigned integer |- | short, int16 || 16-bit...") |
No edit summary |
||
Line 8: | Line 8: | ||
| int, int32 || 32-bit signed integer |
| int, int32 || 32-bit signed integer |
||
|- |
|- |
||
| uint, |
| uint, uint32 || 32-bit unsigned integer |
||
|- |
|- |
||
| short, int16 || 16-bit signed integer |
| short, int16 || 16-bit signed integer |
||
Line 22: | Line 22: | ||
==Structs== |
==Structs== |
||
===AssetID=== |
|||
Asset ID is a type derived from uint32 (unsigned integer). It is considered its own type due to how the game uses Asset IDs to uniquely identify an asset and manage communication between them. |
|||
{| class="wikitable" |
|||
|+ |
|||
! Type |
|||
! Description |
|||
|- |
|||
| uint || 32-bit unsigned integer |
|||
|} |
|||
===Vector2=== |
|||
Vector2 is a set of 2 floats, which usually represent a 2D vector on the world; it is used mostly for texture coordinates. |
|||
{| class="wikitable" |
|||
|+ |
|||
! Type |
|||
! Description |
|||
|- |
|||
| float || X - The X coordinate of this vector |
|||
|- |
|||
| float || Y - The Y coordinate of this vector |
|||
|} |
|||
===Vector3=== |
===Vector3=== |
||
Vector3 is a set of 3 floats, which usually represent a 3D vector on the world, be it position, rotation, scale or RGB color. |
|||
{| class="wikitable" |
{| class="wikitable" |
||
|+ |
|+ |
||
Line 36: | Line 62: | ||
===UIColor=== |
===UIColor=== |
||
UIColor is a set of 4 bytes, which represent a 32 bit color with red, blue, green and alpha components. |
|||
{| class="wikitable" |
{| class="wikitable" |
||
|+ |
|+ |
Revision as of 19:32, 1 September 2018
Basic types
Type | Description |
---|---|
int, int32 | 32-bit signed integer |
uint, uint32 | 32-bit unsigned integer |
short, int16 | 16-bit signed integer |
ushort, uint16 | 16-bit unsigned integer |
byte | 8-bit signed integer |
char | 8-bit unsigned ASCII integer |
float | IEEE 754 floating point number |
Structs
AssetID
Asset ID is a type derived from uint32 (unsigned integer). It is considered its own type due to how the game uses Asset IDs to uniquely identify an asset and manage communication between them.
Type | Description |
---|---|
uint | 32-bit unsigned integer |
Vector2
Vector2 is a set of 2 floats, which usually represent a 2D vector on the world; it is used mostly for texture coordinates.
Type | Description |
---|---|
float | X - The X coordinate of this vector |
float | Y - The Y coordinate of this vector |
Vector3
Vector3 is a set of 3 floats, which usually represent a 3D vector on the world, be it position, rotation, scale or RGB color.
Type | Description |
---|---|
float | X - The X coordinate of this vector |
float | Y - The Y coordinate of this vector |
float | Z - The Z coordinate of this vector |
UIColor
UIColor is a set of 4 bytes, which represent a 32 bit color with red, blue, green and alpha components.
Type | Description |
---|---|
byte | R - red component of this color |
byte | G - green component of this color |
byte | B - blue component of this color |
byte | A - alpha component of this color |