summaryrefslogtreecommitdiff
path: root/tests/monster_test_generated.lobster
diff options
context:
space:
mode:
Diffstat (limited to 'tests/monster_test_generated.lobster')
-rw-r--r--tests/monster_test_generated.lobster24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/monster_test_generated.lobster b/tests/monster_test_generated.lobster
index 14c8ba24..70e50654 100644
--- a/tests/monster_test_generated.lobster
+++ b/tests/monster_test_generated.lobster
@@ -54,6 +54,8 @@ class Vec3
class Ability
+class StructOfStructs
+
class Stat
class Referrable
@@ -164,6 +166,28 @@ def CreateAbility(b_:flatbuffers_builder, id:int, distance:int):
b_.PrependUint32(id)
return b_.Offset()
+class StructOfStructs : flatbuffers_handle
+ def a():
+ return MyGame_Example_Ability{ buf_, pos_ + 0 }
+ def b():
+ return MyGame_Example_Test{ buf_, pos_ + 8 }
+ def c():
+ return MyGame_Example_Ability{ buf_, pos_ + 12 }
+
+def CreateStructOfStructs(b_:flatbuffers_builder, a_id:int, a_distance:int, b_a:int, b_b:int, c_id:int, c_distance:int):
+ b_.Prep(4, 20)
+ b_.Prep(4, 8)
+ b_.PrependUint32(c_distance)
+ b_.PrependUint32(c_id)
+ b_.Prep(2, 4)
+ b_.Pad(1)
+ b_.PrependInt8(b_b)
+ b_.PrependInt16(b_a)
+ b_.Prep(4, 8)
+ b_.PrependUint32(a_distance)
+ b_.PrependUint32(a_id)
+ return b_.Offset()
+
class Stat : flatbuffers_handle
def id():
return buf_.flatbuffers_field_string(pos_, 4)