2020-01-23 22:53:59 +00:00
|
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
2024-11-18 17:31:19 +00:00
|
|
|
// ignore_for_file: unused_import, unused_field, unused_element, unused_local_variable, constant_identifier_names
|
2020-01-23 22:53:59 +00:00
|
|
|
|
|
|
|
library my_game;
|
|
|
|
|
|
|
|
import 'dart:typed_data' show Uint8List;
|
|
|
|
import 'package:flat_buffers/flat_buffers.dart' as fb;
|
|
|
|
|
|
|
|
|
|
|
|
class MonsterExtra {
|
|
|
|
MonsterExtra._(this._bc, this._bcOffset);
|
|
|
|
factory MonsterExtra(List<int> bytes) {
|
2021-08-30 19:54:59 +00:00
|
|
|
final rootRef = fb.BufferContext.fromBytes(bytes);
|
2020-01-23 22:53:59 +00:00
|
|
|
return reader.read(rootRef, 0);
|
|
|
|
}
|
|
|
|
|
2021-08-30 19:54:59 +00:00
|
|
|
static const fb.Reader<MonsterExtra> reader = _MonsterExtraReader();
|
2020-01-23 22:53:59 +00:00
|
|
|
|
|
|
|
final fb.BufferContext _bc;
|
|
|
|
final int _bcOffset;
|
|
|
|
|
|
|
|
double get d0 => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 4, double.nan);
|
|
|
|
double get d1 => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 6, double.nan);
|
|
|
|
double get d2 => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 8, double.infinity);
|
|
|
|
double get d3 => const fb.Float64Reader().vTableGet(_bc, _bcOffset, 10, double.negativeInfinity);
|
|
|
|
double get f0 => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 12, double.nan);
|
|
|
|
double get f1 => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 14, double.nan);
|
|
|
|
double get f2 => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 16, double.infinity);
|
|
|
|
double get f3 => const fb.Float32Reader().vTableGet(_bc, _bcOffset, 18, double.negativeInfinity);
|
2021-08-30 19:54:59 +00:00
|
|
|
List<double>? get dvec => const fb.ListReader<double>(fb.Float64Reader()).vTableGetNullable(_bc, _bcOffset, 20);
|
|
|
|
List<double>? get fvec => const fb.ListReader<double>(fb.Float32Reader()).vTableGetNullable(_bc, _bcOffset, 22);
|
2020-01-23 22:53:59 +00:00
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() {
|
2022-03-28 22:07:09 +00:00
|
|
|
return 'MonsterExtra{d0: ${d0}, d1: ${d1}, d2: ${d2}, d3: ${d3}, f0: ${f0}, f1: ${f1}, f2: ${f2}, f3: ${f3}, dvec: ${dvec}, fvec: ${fvec}}';
|
2020-01-23 22:53:59 +00:00
|
|
|
}
|
2021-06-14 17:15:56 +00:00
|
|
|
|
|
|
|
MonsterExtraT unpack() => MonsterExtraT(
|
|
|
|
d0: d0,
|
|
|
|
d1: d1,
|
|
|
|
d2: d2,
|
|
|
|
d3: d3,
|
|
|
|
f0: f0,
|
|
|
|
f1: f1,
|
|
|
|
f2: f2,
|
|
|
|
f3: f3,
|
2021-08-30 19:54:59 +00:00
|
|
|
dvec: const fb.ListReader<double>(fb.Float64Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 20),
|
|
|
|
fvec: const fb.ListReader<double>(fb.Float32Reader(), lazy: false).vTableGetNullable(_bc, _bcOffset, 22));
|
2021-06-14 17:15:56 +00:00
|
|
|
|
2021-06-22 15:54:57 +00:00
|
|
|
static int pack(fb.Builder fbBuilder, MonsterExtraT? object) {
|
2021-06-14 17:15:56 +00:00
|
|
|
if (object == null) return 0;
|
|
|
|
return object.pack(fbBuilder);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-09-28 20:23:30 +00:00
|
|
|
class MonsterExtraT implements fb.Packable {
|
2021-06-14 17:15:56 +00:00
|
|
|
double d0;
|
|
|
|
double d1;
|
|
|
|
double d2;
|
|
|
|
double d3;
|
|
|
|
double f0;
|
|
|
|
double f1;
|
|
|
|
double f2;
|
|
|
|
double f3;
|
2021-06-22 15:54:57 +00:00
|
|
|
List<double>? dvec;
|
|
|
|
List<double>? fvec;
|
2021-06-14 17:15:56 +00:00
|
|
|
|
|
|
|
MonsterExtraT({
|
2021-06-22 15:54:57 +00:00
|
|
|
this.d0 = double.nan,
|
|
|
|
this.d1 = double.nan,
|
|
|
|
this.d2 = double.infinity,
|
|
|
|
this.d3 = double.negativeInfinity,
|
|
|
|
this.f0 = double.nan,
|
|
|
|
this.f1 = double.nan,
|
|
|
|
this.f2 = double.infinity,
|
|
|
|
this.f3 = double.negativeInfinity,
|
2021-06-14 17:15:56 +00:00
|
|
|
this.dvec,
|
|
|
|
this.fvec});
|
|
|
|
|
2021-09-28 20:23:30 +00:00
|
|
|
@override
|
2021-06-14 17:15:56 +00:00
|
|
|
int pack(fb.Builder fbBuilder) {
|
2021-07-09 19:44:40 +00:00
|
|
|
final int? dvecOffset = dvec == null ? null
|
|
|
|
: fbBuilder.writeListFloat64(dvec!);
|
|
|
|
final int? fvecOffset = fvec == null ? null
|
|
|
|
: fbBuilder.writeListFloat32(fvec!);
|
2022-03-05 05:57:48 +00:00
|
|
|
fbBuilder.startTable(11);
|
2021-06-14 17:15:56 +00:00
|
|
|
fbBuilder.addFloat64(0, d0);
|
|
|
|
fbBuilder.addFloat64(1, d1);
|
|
|
|
fbBuilder.addFloat64(2, d2);
|
|
|
|
fbBuilder.addFloat64(3, d3);
|
|
|
|
fbBuilder.addFloat32(4, f0);
|
|
|
|
fbBuilder.addFloat32(5, f1);
|
|
|
|
fbBuilder.addFloat32(6, f2);
|
|
|
|
fbBuilder.addFloat32(7, f3);
|
2021-06-22 15:54:57 +00:00
|
|
|
fbBuilder.addOffset(8, dvecOffset);
|
|
|
|
fbBuilder.addOffset(9, fvecOffset);
|
2021-06-14 17:15:56 +00:00
|
|
|
return fbBuilder.endTable();
|
|
|
|
}
|
|
|
|
|
|
|
|
@override
|
|
|
|
String toString() {
|
2022-03-28 22:07:09 +00:00
|
|
|
return 'MonsterExtraT{d0: ${d0}, d1: ${d1}, d2: ${d2}, d3: ${d3}, f0: ${f0}, f1: ${f1}, f2: ${f2}, f3: ${f3}, dvec: ${dvec}, fvec: ${fvec}}';
|
2021-06-14 17:15:56 +00:00
|
|
|
}
|
2020-01-23 22:53:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class _MonsterExtraReader extends fb.TableReader<MonsterExtra> {
|
|
|
|
const _MonsterExtraReader();
|
|
|
|
|
|
|
|
@override
|
|
|
|
MonsterExtra createObject(fb.BufferContext bc, int offset) =>
|
2021-08-30 19:54:59 +00:00
|
|
|
MonsterExtra._(bc, offset);
|
2020-01-23 22:53:59 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
class MonsterExtraBuilder {
|
2021-08-30 19:54:59 +00:00
|
|
|
MonsterExtraBuilder(this.fbBuilder);
|
2020-01-23 22:53:59 +00:00
|
|
|
|
|
|
|
final fb.Builder fbBuilder;
|
|
|
|
|
|
|
|
void begin() {
|
2022-03-05 05:57:48 +00:00
|
|
|
fbBuilder.startTable(11);
|
2020-01-23 22:53:59 +00:00
|
|
|
}
|
|
|
|
|
2021-06-22 15:54:57 +00:00
|
|
|
int addD0(double? d0) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat64(0, d0);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addD1(double? d1) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat64(1, d1);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addD2(double? d2) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat64(2, d2);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addD3(double? d3) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat64(3, d3);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addF0(double? f0) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat32(4, f0);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addF1(double? f1) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat32(5, f1);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addF2(double? f2) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat32(6, f2);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addF3(double? f3) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat32(7, f3);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addDvecOffset(int? offset) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addOffset(8, offset);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
2021-06-22 15:54:57 +00:00
|
|
|
int addFvecOffset(int? offset) {
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addOffset(9, offset);
|
|
|
|
return fbBuilder.offset;
|
|
|
|
}
|
|
|
|
|
|
|
|
int finish() {
|
|
|
|
return fbBuilder.endTable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
class MonsterExtraObjectBuilder extends fb.ObjectBuilder {
|
2021-06-22 15:54:57 +00:00
|
|
|
final double? _d0;
|
|
|
|
final double? _d1;
|
|
|
|
final double? _d2;
|
|
|
|
final double? _d3;
|
|
|
|
final double? _f0;
|
|
|
|
final double? _f1;
|
|
|
|
final double? _f2;
|
|
|
|
final double? _f3;
|
|
|
|
final List<double>? _dvec;
|
|
|
|
final List<double>? _fvec;
|
2020-01-23 22:53:59 +00:00
|
|
|
|
|
|
|
MonsterExtraObjectBuilder({
|
2021-06-22 15:54:57 +00:00
|
|
|
double? d0,
|
|
|
|
double? d1,
|
|
|
|
double? d2,
|
|
|
|
double? d3,
|
|
|
|
double? f0,
|
|
|
|
double? f1,
|
|
|
|
double? f2,
|
|
|
|
double? f3,
|
|
|
|
List<double>? dvec,
|
|
|
|
List<double>? fvec,
|
2020-01-23 22:53:59 +00:00
|
|
|
})
|
|
|
|
: _d0 = d0,
|
|
|
|
_d1 = d1,
|
|
|
|
_d2 = d2,
|
|
|
|
_d3 = d3,
|
|
|
|
_f0 = f0,
|
|
|
|
_f1 = f1,
|
|
|
|
_f2 = f2,
|
|
|
|
_f3 = f3,
|
|
|
|
_dvec = dvec,
|
|
|
|
_fvec = fvec;
|
|
|
|
|
|
|
|
/// Finish building, and store into the [fbBuilder].
|
|
|
|
@override
|
2021-06-22 15:54:57 +00:00
|
|
|
int finish(fb.Builder fbBuilder) {
|
2021-07-09 19:44:40 +00:00
|
|
|
final int? dvecOffset = _dvec == null ? null
|
|
|
|
: fbBuilder.writeListFloat64(_dvec!);
|
|
|
|
final int? fvecOffset = _fvec == null ? null
|
|
|
|
: fbBuilder.writeListFloat32(_fvec!);
|
2022-03-05 05:57:48 +00:00
|
|
|
fbBuilder.startTable(11);
|
2020-01-23 22:53:59 +00:00
|
|
|
fbBuilder.addFloat64(0, _d0);
|
|
|
|
fbBuilder.addFloat64(1, _d1);
|
|
|
|
fbBuilder.addFloat64(2, _d2);
|
|
|
|
fbBuilder.addFloat64(3, _d3);
|
|
|
|
fbBuilder.addFloat32(4, _f0);
|
|
|
|
fbBuilder.addFloat32(5, _f1);
|
|
|
|
fbBuilder.addFloat32(6, _f2);
|
|
|
|
fbBuilder.addFloat32(7, _f3);
|
2021-06-22 15:54:57 +00:00
|
|
|
fbBuilder.addOffset(8, dvecOffset);
|
|
|
|
fbBuilder.addOffset(9, fvecOffset);
|
2020-01-23 22:53:59 +00:00
|
|
|
return fbBuilder.endTable();
|
|
|
|
}
|
|
|
|
|
|
|
|
/// Convenience method to serialize to byte list.
|
|
|
|
@override
|
2021-06-22 15:54:57 +00:00
|
|
|
Uint8List toBytes([String? fileIdentifier]) {
|
2021-08-30 19:54:59 +00:00
|
|
|
final fbBuilder = fb.Builder(deduplicateTables: false);
|
|
|
|
fbBuilder.finish(finish(fbBuilder), fileIdentifier);
|
2021-07-09 18:45:45 +00:00
|
|
|
return fbBuilder.buffer;
|
2020-01-23 22:53:59 +00:00
|
|
|
}
|
|
|
|
}
|