#ifndef MONSTER_BUILDER_H #define MONSTER_BUILDER_H /* Generated by flatcc 0.6.2 FlatBuffers schema compiler for C by dvide.com */ #ifndef MONSTER_READER_H #include "monster_reader.h" #endif #ifndef FLATBUFFERS_COMMON_BUILDER_H #include "flatbuffers_common_builder.h" #endif #include "flatcc/flatcc_prologue.h" #ifndef flatbuffers_identifier #define flatbuffers_identifier 0 #endif #ifndef flatbuffers_extension #define flatbuffers_extension "bin" #endif #define __MyGame_Sample_Color_formal_args , MyGame_Sample_Color_enum_t v0 #define __MyGame_Sample_Color_call_args , v0 __flatbuffers_build_scalar(flatbuffers_, MyGame_Sample_Color, MyGame_Sample_Color_enum_t) #define __MyGame_Sample_Vec3_formal_args , float v0, float v1, float v2 #define __MyGame_Sample_Vec3_call_args , v0, v1, v2 static inline MyGame_Sample_Vec3_t *MyGame_Sample_Vec3_assign(MyGame_Sample_Vec3_t *p, float v0, float v1, float v2) { p->x = v0; p->y = v1; p->z = v2; return p; } static inline MyGame_Sample_Vec3_t *MyGame_Sample_Vec3_copy(MyGame_Sample_Vec3_t *p, const MyGame_Sample_Vec3_t *p2) { p->x = p2->x; p->y = p2->y; p->z = p2->z; return p; } static inline MyGame_Sample_Vec3_t *MyGame_Sample_Vec3_assign_to_pe(MyGame_Sample_Vec3_t *p, float v0, float v1, float v2) { flatbuffers_float_assign_to_pe(&p->x, v0); flatbuffers_float_assign_to_pe(&p->y, v1); flatbuffers_float_assign_to_pe(&p->z, v2); return p; } static inline MyGame_Sample_Vec3_t *MyGame_Sample_Vec3_copy_to_pe(MyGame_Sample_Vec3_t *p, const MyGame_Sample_Vec3_t *p2) { flatbuffers_float_copy_to_pe(&p->x, &p2->x); flatbuffers_float_copy_to_pe(&p->y, &p2->y); flatbuffers_float_copy_to_pe(&p->z, &p2->z); return p; } static inline MyGame_Sample_Vec3_t *MyGame_Sample_Vec3_assign_from_pe(MyGame_Sample_Vec3_t *p, float v0, float v1, float v2) { flatbuffers_float_assign_from_pe(&p->x, v0); flatbuffers_float_assign_from_pe(&p->y, v1); flatbuffers_float_assign_from_pe(&p->z, v2); return p; } static inline MyGame_Sample_Vec3_t *MyGame_Sample_Vec3_copy_from_pe(MyGame_Sample_Vec3_t *p, const MyGame_Sample_Vec3_t *p2) { flatbuffers_float_copy_from_pe(&p->x, &p2->x); flatbuffers_float_copy_from_pe(&p->y, &p2->y); flatbuffers_float_copy_from_pe(&p->z, &p2->z); return p; } __flatbuffers_build_struct(flatbuffers_, MyGame_Sample_Vec3, 12, 4, MyGame_Sample_Vec3_file_identifier, MyGame_Sample_Vec3_type_identifier) __flatbuffers_define_fixed_array_primitives(flatbuffers_, MyGame_Sample_Vec3, MyGame_Sample_Vec3_t) typedef flatbuffers_union_ref_t MyGame_Sample_Equipment_union_ref_t; typedef flatbuffers_union_vec_ref_t MyGame_Sample_Equipment_union_vec_ref_t; static MyGame_Sample_Equipment_union_ref_t MyGame_Sample_Equipment_clone(flatbuffers_builder_t *B, MyGame_Sample_Equipment_union_t t); static const flatbuffers_voffset_t __MyGame_Sample_Monster_required[] = { 0 }; typedef flatbuffers_ref_t MyGame_Sample_Monster_ref_t; static MyGame_Sample_Monster_ref_t MyGame_Sample_Monster_clone(flatbuffers_builder_t *B, MyGame_Sample_Monster_table_t t); __flatbuffers_build_table(flatbuffers_, MyGame_Sample_Monster, 10) static const flatbuffers_voffset_t __MyGame_Sample_Weapon_required[] = { 0 }; typedef flatbuffers_ref_t MyGame_Sample_Weapon_ref_t; static MyGame_Sample_Weapon_ref_t MyGame_Sample_Weapon_clone(flatbuffers_builder_t *B, MyGame_Sample_Weapon_table_t t); __flatbuffers_build_table(flatbuffers_, MyGame_Sample_Weapon, 2) #define __MyGame_Sample_Monster_formal_args ,\ MyGame_Sample_Vec3_t *v0, int16_t v1, int16_t v2, flatbuffers_string_ref_t v3,\ flatbuffers_uint8_vec_ref_t v5, MyGame_Sample_Color_enum_t v6, MyGame_Sample_Weapon_vec_ref_t v7, MyGame_Sample_Equipment_union_ref_t v9 #define __MyGame_Sample_Monster_call_args ,\ v0, v1, v2, v3,\ v5, v6, v7, v9 static inline MyGame_Sample_Monster_ref_t MyGame_Sample_Monster_create(flatbuffers_builder_t *B __MyGame_Sample_Monster_formal_args); __flatbuffers_build_table_prolog(flatbuffers_, MyGame_Sample_Monster, MyGame_Sample_Monster_file_identifier, MyGame_Sample_Monster_type_identifier) #define __MyGame_Sample_Weapon_formal_args , flatbuffers_string_ref_t v0, int16_t v1 #define __MyGame_Sample_Weapon_call_args , v0, v1 static inline MyGame_Sample_Weapon_ref_t MyGame_Sample_Weapon_create(flatbuffers_builder_t *B __MyGame_Sample_Weapon_formal_args); __flatbuffers_build_table_prolog(flatbuffers_, MyGame_Sample_Weapon, MyGame_Sample_Weapon_file_identifier, MyGame_Sample_Weapon_type_identifier) static inline MyGame_Sample_Equipment_union_ref_t MyGame_Sample_Equipment_as_NONE(void) { MyGame_Sample_Equipment_union_ref_t uref; uref.type = MyGame_Sample_Equipment_NONE; uref.value = 0; return uref; } static inline MyGame_Sample_Equipment_union_ref_t MyGame_Sample_Equipment_as_Weapon(MyGame_Sample_Weapon_ref_t ref) { MyGame_Sample_Equipment_union_ref_t uref; uref.type = MyGame_Sample_Equipment_Weapon; uref.value = ref; return uref; } __flatbuffers_build_union_vector(flatbuffers_, MyGame_Sample_Equipment) static MyGame_Sample_Equipment_union_ref_t MyGame_Sample_Equipment_clone(flatbuffers_builder_t *B, MyGame_Sample_Equipment_union_t u) { switch (u.type) { case 1: return MyGame_Sample_Equipment_as_Weapon(MyGame_Sample_Weapon_clone(B, (MyGame_Sample_Weapon_table_t)u.value)); default: return MyGame_Sample_Equipment_as_NONE(); } } __flatbuffers_build_struct_field(0, flatbuffers_, MyGame_Sample_Monster_pos, MyGame_Sample_Vec3, 12, 4, MyGame_Sample_Monster) __flatbuffers_build_scalar_field(1, flatbuffers_, MyGame_Sample_Monster_mana, flatbuffers_int16, int16_t, 2, 2, INT16_C(150), MyGame_Sample_Monster) __flatbuffers_build_scalar_field(2, flatbuffers_, MyGame_Sample_Monster_hp, flatbuffers_int16, int16_t, 2, 2, INT16_C(100), MyGame_Sample_Monster) __flatbuffers_build_string_field(3, flatbuffers_, MyGame_Sample_Monster_name, MyGame_Sample_Monster) /* Skipping build of deprecated field: 'MyGame_Sample_Monster_friendly' */ __flatbuffers_build_vector_field(5, flatbuffers_, MyGame_Sample_Monster_inventory, flatbuffers_uint8, uint8_t, MyGame_Sample_Monster) __flatbuffers_build_scalar_field(6, flatbuffers_, MyGame_Sample_Monster_color, MyGame_Sample_Color, MyGame_Sample_Color_enum_t, 1, 1, INT8_C(2), MyGame_Sample_Monster) __flatbuffers_build_table_vector_field(7, flatbuffers_, MyGame_Sample_Monster_weapons, MyGame_Sample_Weapon, MyGame_Sample_Monster) __flatbuffers_build_union_field(9, flatbuffers_, MyGame_Sample_Monster_equipped, MyGame_Sample_Equipment, MyGame_Sample_Monster) __flatbuffers_build_union_table_value_field(flatbuffers_, MyGame_Sample_Monster_equipped, MyGame_Sample_Equipment, Weapon, MyGame_Sample_Weapon) static inline MyGame_Sample_Monster_ref_t MyGame_Sample_Monster_create(flatbuffers_builder_t *B __MyGame_Sample_Monster_formal_args) { if (MyGame_Sample_Monster_start(B) || MyGame_Sample_Monster_pos_add(B, v0) || MyGame_Sample_Monster_name_add(B, v3) || MyGame_Sample_Monster_inventory_add(B, v5) || MyGame_Sample_Monster_weapons_add(B, v7) || MyGame_Sample_Monster_equipped_add_value(B, v9) || MyGame_Sample_Monster_mana_add(B, v1) || MyGame_Sample_Monster_hp_add(B, v2) || MyGame_Sample_Monster_color_add(B, v6) || MyGame_Sample_Monster_equipped_add_type(B, v9.type)) { return 0; } return MyGame_Sample_Monster_end(B); } static MyGame_Sample_Monster_ref_t MyGame_Sample_Monster_clone(flatbuffers_builder_t *B, MyGame_Sample_Monster_table_t t) { __flatbuffers_memoize_begin(B, t); if (MyGame_Sample_Monster_start(B) || MyGame_Sample_Monster_pos_pick(B, t) || MyGame_Sample_Monster_name_pick(B, t) || MyGame_Sample_Monster_inventory_pick(B, t) || MyGame_Sample_Monster_weapons_pick(B, t) || MyGame_Sample_Monster_equipped_pick(B, t) || MyGame_Sample_Monster_mana_pick(B, t) || MyGame_Sample_Monster_hp_pick(B, t) || MyGame_Sample_Monster_color_pick(B, t)) { return 0; } __flatbuffers_memoize_end(B, t, MyGame_Sample_Monster_end(B)); } __flatbuffers_build_string_field(0, flatbuffers_, MyGame_Sample_Weapon_name, MyGame_Sample_Weapon) __flatbuffers_build_scalar_field(1, flatbuffers_, MyGame_Sample_Weapon_damage, flatbuffers_int16, int16_t, 2, 2, INT16_C(0), MyGame_Sample_Weapon) static inline MyGame_Sample_Weapon_ref_t MyGame_Sample_Weapon_create(flatbuffers_builder_t *B __MyGame_Sample_Weapon_formal_args) { if (MyGame_Sample_Weapon_start(B) || MyGame_Sample_Weapon_name_add(B, v0) || MyGame_Sample_Weapon_damage_add(B, v1)) { return 0; } return MyGame_Sample_Weapon_end(B); } static MyGame_Sample_Weapon_ref_t MyGame_Sample_Weapon_clone(flatbuffers_builder_t *B, MyGame_Sample_Weapon_table_t t) { __flatbuffers_memoize_begin(B, t); if (MyGame_Sample_Weapon_start(B) || MyGame_Sample_Weapon_name_pick(B, t) || MyGame_Sample_Weapon_damage_pick(B, t)) { return 0; } __flatbuffers_memoize_end(B, t, MyGame_Sample_Weapon_end(B)); } #include "flatcc/flatcc_epilogue.h" #endif /* MONSTER_BUILDER_H */