184 lines
14 KiB
C#
184 lines
14 KiB
C#
// <auto-generated>
|
|
// automatically generated by the FlatBuffers compiler, do not modify
|
|
// </auto-generated>
|
|
|
|
namespace SCHALE.Common.FlatData
|
|
{
|
|
|
|
using global::System;
|
|
using global::System.Collections.Generic;
|
|
using global::SCHALE.Common.Crypto;
|
|
using global::Google.FlatBuffers;
|
|
|
|
public struct ScenarioExcel : IFlatbufferObject
|
|
{
|
|
private Table __p;
|
|
public ByteBuffer ByteBuffer { get { return __p.bb; } }
|
|
public static void ValidateVersion() { FlatBufferConstants.FLATBUFFERS_24_3_25(); }
|
|
public static ScenarioExcel GetRootAsScenarioExcel(ByteBuffer _bb) { return GetRootAsScenarioExcel(_bb, new ScenarioExcel()); }
|
|
public static ScenarioExcel GetRootAsScenarioExcel(ByteBuffer _bb, ScenarioExcel obj) { return (obj.__assign(_bb.GetInt(_bb.Position) + _bb.Position, _bb)); }
|
|
public void __init(int _i, ByteBuffer _bb) { __p = new Table(_i, _bb); }
|
|
public ScenarioExcel __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; }
|
|
|
|
public SCHALE.Common.FlatData.ScenarioBGType None_(int j) { int o = __p.__offset(4); return o != 0 ? (SCHALE.Common.FlatData.ScenarioBGType)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ScenarioBGType)0; }
|
|
public int None_Length { get { int o = __p.__offset(4); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<SCHALE.Common.FlatData.ScenarioBGType> GetNone_Bytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.ScenarioBGType>(4, 4); }
|
|
#else
|
|
public ArraySegment<byte>? GetNone_Bytes() { return __p.__vector_as_arraysegment(4); }
|
|
#endif
|
|
public SCHALE.Common.FlatData.ScenarioBGType[] GetNone_Array() { int o = __p.__offset(4); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.ScenarioBGType[] a = new SCHALE.Common.FlatData.ScenarioBGType[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.ScenarioBGType)__p.bb.GetInt(p + i * 4); } return a; }
|
|
public SCHALE.Common.FlatData.ScenarioCharacterAction Idle(int j) { int o = __p.__offset(6); return o != 0 ? (SCHALE.Common.FlatData.ScenarioCharacterAction)__p.bb.GetInt(__p.__vector(o) + j * 4) : (SCHALE.Common.FlatData.ScenarioCharacterAction)0; }
|
|
public int IdleLength { get { int o = __p.__offset(6); return o != 0 ? __p.__vector_len(o) : 0; } }
|
|
#if ENABLE_SPAN_T
|
|
public Span<SCHALE.Common.FlatData.ScenarioCharacterAction> GetIdleBytes() { return __p.__vector_as_span<SCHALE.Common.FlatData.ScenarioCharacterAction>(6, 4); }
|
|
#else
|
|
public ArraySegment<byte>? GetIdleBytes() { return __p.__vector_as_arraysegment(6); }
|
|
#endif
|
|
public SCHALE.Common.FlatData.ScenarioCharacterAction[] GetIdleArray() { int o = __p.__offset(6); if (o == 0) return null; int p = __p.__vector(o); int l = __p.__vector_len(o); SCHALE.Common.FlatData.ScenarioCharacterAction[] a = new SCHALE.Common.FlatData.ScenarioCharacterAction[l]; for (int i = 0; i < l; i++) { a[i] = (SCHALE.Common.FlatData.ScenarioCharacterAction)__p.bb.GetInt(p + i * 4); } return a; }
|
|
public SCHALE.Common.FlatData.DialogCategory Cafe { get { int o = __p.__offset(8); return o != 0 ? (SCHALE.Common.FlatData.DialogCategory)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.DialogCategory.Cafe; } }
|
|
public SCHALE.Common.FlatData.DialogType Talk { get { int o = __p.__offset(10); return o != 0 ? (SCHALE.Common.FlatData.DialogType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.DialogType.Talk; } }
|
|
public SCHALE.Common.FlatData.StoryCondition Open { get { int o = __p.__offset(12); return o != 0 ? (SCHALE.Common.FlatData.StoryCondition)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.StoryCondition.Open; } }
|
|
public SCHALE.Common.FlatData.EmojiEvent EnterConver { get { int o = __p.__offset(14); return o != 0 ? (SCHALE.Common.FlatData.EmojiEvent)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.EmojiEvent.EnterConver; } }
|
|
public SCHALE.Common.FlatData.ScenarioZoomAnchors Center { get { int o = __p.__offset(16); return o != 0 ? (SCHALE.Common.FlatData.ScenarioZoomAnchors)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ScenarioZoomAnchors.Center; } }
|
|
public SCHALE.Common.FlatData.ScenarioZoomType Instant { get { int o = __p.__offset(18); return o != 0 ? (SCHALE.Common.FlatData.ScenarioZoomType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ScenarioZoomType.Instant; } }
|
|
public SCHALE.Common.FlatData.ScenarioContentType Prologue { get { int o = __p.__offset(20); return o != 0 ? (SCHALE.Common.FlatData.ScenarioContentType)__p.bb.GetInt(o + __p.bb_pos) : SCHALE.Common.FlatData.ScenarioContentType.Prologue; } }
|
|
|
|
public static Offset<SCHALE.Common.FlatData.ScenarioExcel> CreateScenarioExcel(FlatBufferBuilder builder,
|
|
VectorOffset None_Offset = default(VectorOffset),
|
|
VectorOffset IdleOffset = default(VectorOffset),
|
|
SCHALE.Common.FlatData.DialogCategory Cafe = SCHALE.Common.FlatData.DialogCategory.Cafe,
|
|
SCHALE.Common.FlatData.DialogType Talk = SCHALE.Common.FlatData.DialogType.Talk,
|
|
SCHALE.Common.FlatData.StoryCondition Open = SCHALE.Common.FlatData.StoryCondition.Open,
|
|
SCHALE.Common.FlatData.EmojiEvent EnterConver = SCHALE.Common.FlatData.EmojiEvent.EnterConver,
|
|
SCHALE.Common.FlatData.ScenarioZoomAnchors Center = SCHALE.Common.FlatData.ScenarioZoomAnchors.Center,
|
|
SCHALE.Common.FlatData.ScenarioZoomType Instant = SCHALE.Common.FlatData.ScenarioZoomType.Instant,
|
|
SCHALE.Common.FlatData.ScenarioContentType Prologue = SCHALE.Common.FlatData.ScenarioContentType.Prologue) {
|
|
builder.StartTable(9);
|
|
ScenarioExcel.AddPrologue(builder, Prologue);
|
|
ScenarioExcel.AddInstant(builder, Instant);
|
|
ScenarioExcel.AddCenter(builder, Center);
|
|
ScenarioExcel.AddEnterConver(builder, EnterConver);
|
|
ScenarioExcel.AddOpen(builder, Open);
|
|
ScenarioExcel.AddTalk(builder, Talk);
|
|
ScenarioExcel.AddCafe(builder, Cafe);
|
|
ScenarioExcel.AddIdle(builder, IdleOffset);
|
|
ScenarioExcel.AddNone_(builder, None_Offset);
|
|
return ScenarioExcel.EndScenarioExcel(builder);
|
|
}
|
|
|
|
public static void StartScenarioExcel(FlatBufferBuilder builder) { builder.StartTable(9); }
|
|
public static void AddNone_(FlatBufferBuilder builder, VectorOffset none_Offset) { builder.AddOffset(0, none_Offset.Value, 0); }
|
|
public static VectorOffset CreateNone_Vector(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioBGType[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); }
|
|
public static VectorOffset CreateNone_VectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioBGType[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateNone_VectorBlock(FlatBufferBuilder builder, ArraySegment<SCHALE.Common.FlatData.ScenarioBGType> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateNone_VectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<SCHALE.Common.FlatData.ScenarioBGType>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartNone_Vector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
|
public static void AddIdle(FlatBufferBuilder builder, VectorOffset idleOffset) { builder.AddOffset(1, idleOffset.Value, 0); }
|
|
public static VectorOffset CreateIdleVector(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioCharacterAction[] data) { builder.StartVector(4, data.Length, 4); for (int i = data.Length - 1; i >= 0; i--) builder.AddInt((int)data[i]); return builder.EndVector(); }
|
|
public static VectorOffset CreateIdleVectorBlock(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioCharacterAction[] data) { builder.StartVector(4, data.Length, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateIdleVectorBlock(FlatBufferBuilder builder, ArraySegment<SCHALE.Common.FlatData.ScenarioCharacterAction> data) { builder.StartVector(4, data.Count, 4); builder.Add(data); return builder.EndVector(); }
|
|
public static VectorOffset CreateIdleVectorBlock(FlatBufferBuilder builder, IntPtr dataPtr, int sizeInBytes) { builder.StartVector(1, sizeInBytes, 1); builder.Add<SCHALE.Common.FlatData.ScenarioCharacterAction>(dataPtr, sizeInBytes); return builder.EndVector(); }
|
|
public static void StartIdleVector(FlatBufferBuilder builder, int numElems) { builder.StartVector(4, numElems, 4); }
|
|
public static void AddCafe(FlatBufferBuilder builder, SCHALE.Common.FlatData.DialogCategory cafe) { builder.AddInt(2, (int)cafe, 0); }
|
|
public static void AddTalk(FlatBufferBuilder builder, SCHALE.Common.FlatData.DialogType talk) { builder.AddInt(3, (int)talk, 0); }
|
|
public static void AddOpen(FlatBufferBuilder builder, SCHALE.Common.FlatData.StoryCondition open) { builder.AddInt(4, (int)open, 0); }
|
|
public static void AddEnterConver(FlatBufferBuilder builder, SCHALE.Common.FlatData.EmojiEvent enterConver) { builder.AddInt(5, (int)enterConver, 0); }
|
|
public static void AddCenter(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioZoomAnchors center) { builder.AddInt(6, (int)center, 0); }
|
|
public static void AddInstant(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioZoomType instant) { builder.AddInt(7, (int)instant, 0); }
|
|
public static void AddPrologue(FlatBufferBuilder builder, SCHALE.Common.FlatData.ScenarioContentType prologue) { builder.AddInt(8, (int)prologue, 0); }
|
|
public static Offset<SCHALE.Common.FlatData.ScenarioExcel> EndScenarioExcel(FlatBufferBuilder builder) {
|
|
int o = builder.EndTable();
|
|
return new Offset<SCHALE.Common.FlatData.ScenarioExcel>(o);
|
|
}
|
|
public ScenarioExcelT UnPack() {
|
|
var _o = new ScenarioExcelT();
|
|
this.UnPackTo(_o);
|
|
return _o;
|
|
}
|
|
public void UnPackTo(ScenarioExcelT _o) {
|
|
byte[] key = TableEncryptionService.CreateKey("Scenario");
|
|
_o.None_ = new List<SCHALE.Common.FlatData.ScenarioBGType>();
|
|
for (var _j = 0; _j < this.None_Length; ++_j) {_o.None_.Add(TableEncryptionService.Convert(this.None_(_j), key));}
|
|
_o.Idle = new List<SCHALE.Common.FlatData.ScenarioCharacterAction>();
|
|
for (var _j = 0; _j < this.IdleLength; ++_j) {_o.Idle.Add(TableEncryptionService.Convert(this.Idle(_j), key));}
|
|
_o.Cafe = TableEncryptionService.Convert(this.Cafe, key);
|
|
_o.Talk = TableEncryptionService.Convert(this.Talk, key);
|
|
_o.Open = TableEncryptionService.Convert(this.Open, key);
|
|
_o.EnterConver = TableEncryptionService.Convert(this.EnterConver, key);
|
|
_o.Center = TableEncryptionService.Convert(this.Center, key);
|
|
_o.Instant = TableEncryptionService.Convert(this.Instant, key);
|
|
_o.Prologue = TableEncryptionService.Convert(this.Prologue, key);
|
|
}
|
|
public static Offset<SCHALE.Common.FlatData.ScenarioExcel> Pack(FlatBufferBuilder builder, ScenarioExcelT _o) {
|
|
if (_o == null) return default(Offset<SCHALE.Common.FlatData.ScenarioExcel>);
|
|
var _None_ = default(VectorOffset);
|
|
if (_o.None_ != null) {
|
|
var __None_ = _o.None_.ToArray();
|
|
_None_ = CreateNone_Vector(builder, __None_);
|
|
}
|
|
var _Idle = default(VectorOffset);
|
|
if (_o.Idle != null) {
|
|
var __Idle = _o.Idle.ToArray();
|
|
_Idle = CreateIdleVector(builder, __Idle);
|
|
}
|
|
return CreateScenarioExcel(
|
|
builder,
|
|
_None_,
|
|
_Idle,
|
|
_o.Cafe,
|
|
_o.Talk,
|
|
_o.Open,
|
|
_o.EnterConver,
|
|
_o.Center,
|
|
_o.Instant,
|
|
_o.Prologue);
|
|
}
|
|
}
|
|
|
|
public class ScenarioExcelT
|
|
{
|
|
public List<SCHALE.Common.FlatData.ScenarioBGType> None_ { get; set; }
|
|
public List<SCHALE.Common.FlatData.ScenarioCharacterAction> Idle { get; set; }
|
|
public SCHALE.Common.FlatData.DialogCategory Cafe { get; set; }
|
|
public SCHALE.Common.FlatData.DialogType Talk { get; set; }
|
|
public SCHALE.Common.FlatData.StoryCondition Open { get; set; }
|
|
public SCHALE.Common.FlatData.EmojiEvent EnterConver { get; set; }
|
|
public SCHALE.Common.FlatData.ScenarioZoomAnchors Center { get; set; }
|
|
public SCHALE.Common.FlatData.ScenarioZoomType Instant { get; set; }
|
|
public SCHALE.Common.FlatData.ScenarioContentType Prologue { get; set; }
|
|
|
|
public ScenarioExcelT() {
|
|
this.None_ = null;
|
|
this.Idle = null;
|
|
this.Cafe = SCHALE.Common.FlatData.DialogCategory.Cafe;
|
|
this.Talk = SCHALE.Common.FlatData.DialogType.Talk;
|
|
this.Open = SCHALE.Common.FlatData.StoryCondition.Open;
|
|
this.EnterConver = SCHALE.Common.FlatData.EmojiEvent.EnterConver;
|
|
this.Center = SCHALE.Common.FlatData.ScenarioZoomAnchors.Center;
|
|
this.Instant = SCHALE.Common.FlatData.ScenarioZoomType.Instant;
|
|
this.Prologue = SCHALE.Common.FlatData.ScenarioContentType.Prologue;
|
|
}
|
|
}
|
|
|
|
|
|
static public class ScenarioExcelVerify
|
|
{
|
|
static public bool Verify(Google.FlatBuffers.Verifier verifier, uint tablePos)
|
|
{
|
|
return verifier.VerifyTableStart(tablePos)
|
|
&& verifier.VerifyVectorOfData(tablePos, 4 /*None_*/, 4 /*SCHALE.Common.FlatData.ScenarioBGType*/, false)
|
|
&& verifier.VerifyVectorOfData(tablePos, 6 /*Idle*/, 4 /*SCHALE.Common.FlatData.ScenarioCharacterAction*/, false)
|
|
&& verifier.VerifyField(tablePos, 8 /*Cafe*/, 4 /*SCHALE.Common.FlatData.DialogCategory*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 10 /*Talk*/, 4 /*SCHALE.Common.FlatData.DialogType*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 12 /*Open*/, 4 /*SCHALE.Common.FlatData.StoryCondition*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 14 /*EnterConver*/, 4 /*SCHALE.Common.FlatData.EmojiEvent*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 16 /*Center*/, 4 /*SCHALE.Common.FlatData.ScenarioZoomAnchors*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 18 /*Instant*/, 4 /*SCHALE.Common.FlatData.ScenarioZoomType*/, 4, false)
|
|
&& verifier.VerifyField(tablePos, 20 /*Prologue*/, 4 /*SCHALE.Common.FlatData.ScenarioContentType*/, 4, false)
|
|
&& verifier.VerifyTableEnd(tablePos);
|
|
}
|
|
}
|
|
|
|
}
|