Skip to content

Instantly share code, notes, and snippets.

@Pwootage
Created September 4, 2016 18:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pwootage/9a00f2e5aaa8a36d5bde7fd90632a5c9 to your computer and use it in GitHub Desktop.
Save Pwootage/9a00f2e5aaa8a36d5bde7fd90632a5c9 to your computer and use it in GitHub Desktop.
Bstruct example
big endian struct Example1 {
int32 anInt;
float positionedFloat 0x16;
float[3] position 32;
}
little endian struct Test1 {
float[6] bb;
}
struct Test2 extends Test1 {
}
struct Cat {
}
struct Dog {
}
struct CatDog extends Cat, Dog {
}
[
{
"struct": {
"name": "Example1",
"endian": "big",
"extends": null,
"fields": [
{
"type": "int32",
"name": "anInt",
"offset": null
},
{
"type": "float",
"name": "positionedFloat",
"offset": "0x16"
},
{
"type": {
"array": true,
"type": "float",
"length": "3"
},
"name": "position",
"offset": "32"
}
]
}
},
{
"struct": {
"name": "Test1",
"endian": "little",
"extends": null,
"fields": [
{
"type": {
"array": true,
"type": "float",
"length": "6"
},
"name": "bb",
"offset": null
}
]
}
},
{
"struct": {
"name": "Test2",
"endian": null,
"extends": [
"Test1"
],
"fields": []
}
},
{
"struct": {
"name": "Cat",
"endian": null,
"extends": null,
"fields": []
}
},
{
"struct": {
"name": "Dog",
"endian": null,
"extends": null,
"fields": []
}
},
{
"struct": {
"name": "CatDog",
"endian": null,
"extends": [
"Dog",
"Cat"
],
"fields": []
}
}
] ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment