Created
September 4, 2016 18:51
-
-
Save Pwootage/9a00f2e5aaa8a36d5bde7fd90632a5c9 to your computer and use it in GitHub Desktop.
Bstruct example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 { | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"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