From e953c438a9f00dd5a7e1bb9cd2b043a7238ffd55 Mon Sep 17 00:00:00 2001 From: Waterpicker Date: Mon, 23 Oct 2023 19:36:28 -0500 Subject: [PATCH] 2.4.6 --- build.gradle.kts | 2 +- .../pokeutils/GFLib/Anim/Animation.java | 108 +++++++++++ .../pokeutils/GFLib/Anim/AnimationT.java | 66 +++++++ .../pokeutils/GFLib/Anim/BoneAnimation.java | 91 +++++++++ .../pokeutils/GFLib/Anim/BoneAnimationT.java | 40 ++++ .../pokeutils/GFLib/Anim/BoneInit.java | 67 +++++++ .../pokeutils/GFLib/Anim/BoneInitT.java | 40 ++++ .../pokeutils/GFLib/Anim/BoneTrack.java | 180 ++++++++++++++++++ .../pokeutils/GFLib/Anim/BoneTrackT.java | 52 +++++ .../pokeutils/GFLib/Anim/BooleanTrack.java | 18 ++ .../GFLib/Anim/BooleanTrackUnion.java | 39 ++++ .../pokeutils/GFLib/Anim/ByteDataTrack.java | 68 +++++++ .../pokeutils/GFLib/Anim/ByteDataTrackT.java | 34 ++++ .../pokeutils/GFLib/Anim/ByteTrack.java | 18 ++ .../pokeutils/GFLib/Anim/ByteTrackUnion.java | 39 ++++ .../pokeutils/GFLib/Anim/ColorEntry.java | 107 +++++++++++ .../pokeutils/GFLib/Anim/ColorEntryT.java | 40 ++++ .../GFLib/Anim/CommandAnimation.java | 82 ++++++++ .../GFLib/Anim/CommandAnimationT.java | 34 ++++ .../pokeutils/GFLib/Anim/CommandEntry.java | 107 +++++++++++ .../pokeutils/GFLib/Anim/CommandEntryT.java | 40 ++++ .../pokeutils/GFLib/Anim/CommandTrack.java | 106 +++++++++++ .../pokeutils/GFLib/Anim/CommandTrackT.java | 52 +++++ .../pokeutils/GFLib/Anim/DataTrack.java | 18 ++ .../pokeutils/GFLib/Anim/DataTrackUnion.java | 39 ++++ .../GFLib/Anim/DynamicBooleanTrack.java | 80 ++++++++ .../GFLib/Anim/DynamicBooleanTrackT.java | 34 ++++ .../GFLib/Anim/DynamicByteTrack.java | 84 ++++++++ .../GFLib/Anim/DynamicByteTrackT.java | 34 ++++ .../GFLib/Anim/DynamicFloatTrack.java | 80 ++++++++ .../GFLib/Anim/DynamicFloatTrackT.java | 34 ++++ .../GFLib/Anim/DynamicRotationTrack.java | 82 ++++++++ .../GFLib/Anim/DynamicRotationTrackT.java | 29 +++ .../GFLib/Anim/DynamicVectorTrack.java | 82 ++++++++ .../GFLib/Anim/DynamicVectorTrackT.java | 46 +++++ .../GFLib/Anim/FixedBooleanTrack.java | 68 +++++++ .../GFLib/Anim/FixedBooleanTrackT.java | 34 ++++ .../pokeutils/GFLib/Anim/FixedByteTrack.java | 68 +++++++ .../pokeutils/GFLib/Anim/FixedByteTrackT.java | 34 ++++ .../pokeutils/GFLib/Anim/FixedFloatTrack.java | 68 +++++++ .../GFLib/Anim/FixedFloatTrackT.java | 34 ++++ .../GFLib/Anim/FixedRotationTrack.java | 62 ++++++ .../GFLib/Anim/FixedRotationTrackT.java | 26 +++ .../GFLib/Anim/FixedVectorTrack.java | 62 ++++++ .../GFLib/Anim/FixedVectorTrackT.java | 42 ++++ .../pokeutils/GFLib/Anim/FlagEntry.java | 107 +++++++++++ .../pokeutils/GFLib/Anim/FlagEntryT.java | 40 ++++ .../pokeutils/GFLib/Anim/FloatDataTrack.java | 68 +++++++ .../pokeutils/GFLib/Anim/FloatDataTrackT.java | 34 ++++ .../pokeutils/GFLib/Anim/FloatTrack.java | 18 ++ .../pokeutils/GFLib/Anim/FloatTrackUnion.java | 39 ++++ .../GFLib/Anim/Framed16BooleanTrack.java | 99 ++++++++++ .../GFLib/Anim/Framed16BooleanTrackT.java | 40 ++++ .../GFLib/Anim/Framed16ByteTrack.java | 103 ++++++++++ .../GFLib/Anim/Framed16ByteTrackT.java | 40 ++++ .../GFLib/Anim/Framed16FloatTrack.java | 99 ++++++++++ .../GFLib/Anim/Framed16FloatTrackT.java | 40 ++++ .../GFLib/Anim/Framed16RotationTrack.java | 101 ++++++++++ .../GFLib/Anim/Framed16RotationTrackT.java | 37 ++++ .../GFLib/Anim/Framed16VectorTrack.java | 101 ++++++++++ .../GFLib/Anim/Framed16VectorTrackT.java | 51 +++++ .../GFLib/Anim/Framed8BooleanTrack.java | 103 ++++++++++ .../GFLib/Anim/Framed8BooleanTrackT.java | 40 ++++ .../GFLib/Anim/Framed8ByteTrack.java | 107 +++++++++++ .../GFLib/Anim/Framed8ByteTrackT.java | 40 ++++ .../GFLib/Anim/Framed8FloatTrack.java | 103 ++++++++++ .../GFLib/Anim/Framed8FloatTrackT.java | 40 ++++ .../GFLib/Anim/Framed8RotationTrack.java | 105 ++++++++++ .../GFLib/Anim/Framed8RotationTrackT.java | 36 ++++ .../GFLib/Anim/Framed8VectorTrack.java | 105 ++++++++++ .../GFLib/Anim/Framed8VectorTrackT.java | 51 +++++ .../rarecandy/pokeutils/GFLib/Anim/Info.java | 82 ++++++++ .../rarecandy/pokeutils/GFLib/Anim/InfoT.java | 46 +++++ .../pokeutils/GFLib/Anim/IntDataTrack.java | 68 +++++++ .../pokeutils/GFLib/Anim/IntDataTrackT.java | 34 ++++ .../GFLib/Anim/MaterialAnimation.java | 82 ++++++++ .../GFLib/Anim/MaterialAnimationT.java | 34 ++++ .../pokeutils/GFLib/Anim/MaterialTrack.java | 134 +++++++++++++ .../pokeutils/GFLib/Anim/MaterialTrackT.java | 52 +++++ .../pokeutils/GFLib/Anim/RotationTrack.java | 18 ++ .../GFLib/Anim/RotationTrackUnion.java | 45 +++++ .../pokeutils/GFLib/Anim/ShaderEntry.java | 107 +++++++++++ .../pokeutils/GFLib/Anim/ShaderEntryT.java | 40 ++++ .../pokeutils/GFLib/Anim/SkinAnimation.java | 82 ++++++++ .../pokeutils/GFLib/Anim/SkinAnimationT.java | 34 ++++ .../pokeutils/GFLib/Anim/SkinTrack.java | 107 +++++++++++ .../pokeutils/GFLib/Anim/SkinTrackT.java | 40 ++++ .../pokeutils/GFLib/Anim/StringDataTrack.java | 71 +++++++ .../GFLib/Anim/StringDataTrackT.java | 34 ++++ .../pokeutils/GFLib/Anim/Transform.java | 94 +++++++++ .../pokeutils/GFLib/Anim/TransformT.java | 46 +++++ .../rarecandy/pokeutils/GFLib/Anim/Vec2.java | 62 ++++++ .../rarecandy/pokeutils/GFLib/Anim/Vec2T.java | 40 ++++ .../rarecandy/pokeutils/GFLib/Anim/Vec3.java | 67 +++++++ .../rarecandy/pokeutils/GFLib/Anim/Vec3T.java | 46 +++++ .../rarecandy/pokeutils/GFLib/Anim/Vec4.java | 72 +++++++ .../rarecandy/pokeutils/GFLib/Anim/Vec4T.java | 52 +++++ .../pokeutils/GFLib/Anim/VectorTrack.java | 18 ++ .../GFLib/Anim/VectorTrackUnion.java | 40 ++++ .../rarecandy/pokeutils/GFLib/Anim/sVec2.java | 62 ++++++ .../pokeutils/GFLib/Anim/sVec2T.java | 40 ++++ .../rarecandy/pokeutils/GFLib/Anim/sVec3.java | 67 +++++++ .../pokeutils/GFLib/Anim/sVec3T.java | 46 +++++ .../pokeutils/MaterialReference.java | 3 + .../pokeutils/UnlitCullMaterialReference.java | 13 ++ .../pokeutils/UnlitMaterialReference.java | 8 +- .../renderer/animation/Animation.java | 56 +++++- .../renderer/loading/ModelLoader.java | 33 +++- .../renderer/model/GlCallSupplier.java | 2 +- .../shaders/animated/animated.vs.glsl | 7 +- .../shaders/animated/animated_pbr.fs.glsl | 47 ----- .../resources/shaders/animated/solid.fs.glsl | 5 +- .../shaders/animated/transparent.fs.glsl | 5 +- .../shaders/animated/transparent_pbr.fs.glsl | 47 ----- .../resources/shaders/animated/unlit.fs.glsl | 4 +- src/library/resources/shaders/gui/gui.fs.glsl | 17 -- src/library/resources/shaders/gui/gui.vs.glsl | 16 -- .../resources/shaders/stat_up/stat_up.fs.glsl | 19 -- .../resources/shaders/stat_up/stat_up.vs.glsl | 21 -- .../resources/shaders/static/static.fs.glsl | 22 --- .../resources/shaders/static/static.vs.glsl | 28 --- .../rarecandy/tools/gui/GuiPipelines.java | 17 -- .../rarecandy/tools/gui/RareCandyCanvas.java | 4 +- .../tools/pixelmonTester/Pipelines.java | 43 ----- .../tools/pixelmonTester/PokemonTest.java | 50 ++--- 125 files changed, 6318 insertions(+), 328 deletions(-) create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Animation.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/AnimationT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimation.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimationT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInit.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInitT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrackUnion.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrackUnion.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntry.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntryT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimation.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimationT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntry.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntryT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrackUnion.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntry.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntryT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrackUnion.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Info.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/InfoT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimation.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimationT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrackUnion.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntry.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntryT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimation.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimationT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrackT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Transform.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/TransformT.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2T.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3T.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4T.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrack.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrackUnion.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2T.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3T.java create mode 100644 src/library/java/gg/generations/rarecandy/pokeutils/UnlitCullMaterialReference.java delete mode 100644 src/library/resources/shaders/animated/animated_pbr.fs.glsl delete mode 100644 src/library/resources/shaders/animated/transparent_pbr.fs.glsl delete mode 100644 src/library/resources/shaders/gui/gui.fs.glsl delete mode 100644 src/library/resources/shaders/gui/gui.vs.glsl delete mode 100644 src/library/resources/shaders/stat_up/stat_up.fs.glsl delete mode 100644 src/library/resources/shaders/stat_up/stat_up.vs.glsl delete mode 100644 src/library/resources/shaders/static/static.fs.glsl delete mode 100644 src/library/resources/shaders/static/static.vs.glsl delete mode 100644 src/main/java/gg/generations/rarecandy/tools/pixelmonTester/Pipelines.java diff --git a/build.gradle.kts b/build.gradle.kts index da18ca65..46459b0c 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -7,7 +7,7 @@ plugins { } group = "gg.generations" -version = "2.4.5-SNAPSHOT" +version = "2.4.6-SNAPSHOT" java.toolchain.languageVersion.set(JavaLanguageVersion.of(17)) diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Animation.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Animation.java new file mode 100644 index 00000000..e31b263f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Animation.java @@ -0,0 +1,108 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Animation extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Animation getRootAsAnimation(ByteBuffer _bb) { return getRootAsAnimation(_bb, new Animation()); } + public static Animation getRootAsAnimation(ByteBuffer _bb, Animation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Animation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public Info info() { return info(new Info()); } + public Info info(Info obj) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public BoneAnimation skeleton() { return skeleton(new BoneAnimation()); } + public BoneAnimation skeleton(BoneAnimation obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public MaterialAnimation material() { return material(new MaterialAnimation()); } + public MaterialAnimation material(MaterialAnimation obj) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public SkinAnimation visibility() { return visibility(new SkinAnimation()); } + public SkinAnimation visibility(SkinAnimation obj) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + public CommandAnimation eventData() { return eventData(new CommandAnimation()); } + public CommandAnimation eventData(CommandAnimation obj) { int o = __offset(12); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createAnimation(FlatBufferBuilder builder, + int infoOffset, + int skeletonOffset, + int materialOffset, + int visibilityOffset, + int eventDataOffset) { + builder.startTable(5); + Animation.addEventData(builder, eventDataOffset); + Animation.addVisibility(builder, visibilityOffset); + Animation.addMaterial(builder, materialOffset); + Animation.addSkeleton(builder, skeletonOffset); + Animation.addInfo(builder, infoOffset); + return Animation.endAnimation(builder); + } + + public static void startAnimation(FlatBufferBuilder builder) { builder.startTable(5); } + public static void addInfo(FlatBufferBuilder builder, int infoOffset) { builder.addOffset(0, infoOffset, 0); } + public static void addSkeleton(FlatBufferBuilder builder, int skeletonOffset) { builder.addOffset(1, skeletonOffset, 0); } + public static void addMaterial(FlatBufferBuilder builder, int materialOffset) { builder.addOffset(2, materialOffset, 0); } + public static void addVisibility(FlatBufferBuilder builder, int visibilityOffset) { builder.addOffset(3, visibilityOffset, 0); } + public static void addEventData(FlatBufferBuilder builder, int eventDataOffset) { builder.addOffset(4, eventDataOffset, 0); } + public static int endAnimation(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + public static void finishAnimationBuffer(FlatBufferBuilder builder, int offset) { builder.finish(offset); } + public static void finishSizePrefixedAnimationBuffer(FlatBufferBuilder builder, int offset) { builder.finishSizePrefixed(offset); } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Animation get(int j) { return get(new Animation(), j); } + public Animation get(Animation obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public AnimationT unpack() { + AnimationT _o = new AnimationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(AnimationT _o) { + if (info() != null) _o.setInfo(info().unpack()); + else _o.setInfo(null); + if (skeleton() != null) _o.setSkeleton(skeleton().unpack()); + else _o.setSkeleton(null); + if (material() != null) _o.setMaterial(material().unpack()); + else _o.setMaterial(null); + if (visibility() != null) _o.setVisibility(visibility().unpack()); + else _o.setVisibility(null); + if (eventData() != null) _o.setEventData(eventData().unpack()); + else _o.setEventData(null); + } + public static int pack(FlatBufferBuilder builder, AnimationT _o) { + if (_o == null) return 0; + int _info = _o.getInfo() == null ? 0 : Info.pack(builder, _o.getInfo()); + int _skeleton = _o.getSkeleton() == null ? 0 : BoneAnimation.pack(builder, _o.getSkeleton()); + int _material = _o.getMaterial() == null ? 0 : MaterialAnimation.pack(builder, _o.getMaterial()); + int _visibility = _o.getVisibility() == null ? 0 : SkinAnimation.pack(builder, _o.getVisibility()); + int _eventData = _o.getEventData() == null ? 0 : CommandAnimation.pack(builder, _o.getEventData()); + return createAnimation( + builder, + _info, + _skeleton, + _material, + _visibility, + _eventData); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/AnimationT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/AnimationT.java new file mode 100644 index 00000000..b80a1632 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/AnimationT.java @@ -0,0 +1,66 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class AnimationT { + private InfoT info; + private BoneAnimationT skeleton; + private MaterialAnimationT material; + private SkinAnimationT visibility; + private CommandAnimationT eventData; + + public InfoT getInfo() { return info; } + + public void setInfo(InfoT info) { this.info = info; } + + public BoneAnimationT getSkeleton() { return skeleton; } + + public void setSkeleton(BoneAnimationT skeleton) { this.skeleton = skeleton; } + + public MaterialAnimationT getMaterial() { return material; } + + public void setMaterial(MaterialAnimationT material) { this.material = material; } + + public SkinAnimationT getVisibility() { return visibility; } + + public void setVisibility(SkinAnimationT visibility) { this.visibility = visibility; } + + public CommandAnimationT getEventData() { return eventData; } + + public void setEventData(CommandAnimationT eventData) { this.eventData = eventData; } + + + public AnimationT() { + this.info = null; + this.skeleton = null; + this.material = null; + this.visibility = null; + this.eventData = null; + } + public static AnimationT deserializeFromBinary(byte[] fbBuffer) { + return Animation.getRootAsAnimation(ByteBuffer.wrap(fbBuffer)).unpack(); + } + public byte[] serializeToBinary() { + FlatBufferBuilder fbb = new FlatBufferBuilder(); + Animation.finishAnimationBuffer(fbb, Animation.pack(fbb, this)); + return fbb.sizedByteArray(); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimation.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimation.java new file mode 100644 index 00000000..d6eea520 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimation.java @@ -0,0 +1,91 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class BoneAnimation extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static BoneAnimation getRootAsBoneAnimation(ByteBuffer _bb) { return getRootAsBoneAnimation(_bb, new BoneAnimation()); } + public static BoneAnimation getRootAsBoneAnimation(ByteBuffer _bb, BoneAnimation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BoneAnimation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public BoneTrack tracks(int j) { return tracks(new BoneTrack(), j); } + public BoneTrack tracks(BoneTrack obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int tracksLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public BoneTrack.Vector tracksVector() { return tracksVector(new BoneTrack.Vector()); } + public BoneTrack.Vector tracksVector(BoneTrack.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public BoneInit initData() { return initData(new BoneInit()); } + public BoneInit initData(BoneInit obj) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(o + bb_pos), bb) : null; } + + public static int createBoneAnimation(FlatBufferBuilder builder, + int tracksOffset, + int initDataOffset) { + builder.startTable(2); + BoneAnimation.addInitData(builder, initDataOffset); + BoneAnimation.addTracks(builder, tracksOffset); + return BoneAnimation.endBoneAnimation(builder); + } + + public static void startBoneAnimation(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addTracks(FlatBufferBuilder builder, int tracksOffset) { builder.addOffset(0, tracksOffset, 0); } + public static int createTracksVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startTracksVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addInitData(FlatBufferBuilder builder, int initDataOffset) { builder.addOffset(1, initDataOffset, 0); } + public static int endBoneAnimation(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BoneAnimation get(int j) { return get(new BoneAnimation(), j); } + public BoneAnimation get(BoneAnimation obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public BoneAnimationT unpack() { + BoneAnimationT _o = new BoneAnimationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(BoneAnimationT _o) { + BoneTrackT[] _oTracks = new BoneTrackT[tracksLength()]; + for (int _j = 0; _j < tracksLength(); ++_j) {_oTracks[_j] = (tracks(_j) != null ? tracks(_j).unpack() : null);} + _o.setTracks(_oTracks); + if (initData() != null) _o.setInitData(initData().unpack()); + else _o.setInitData(null); + } + public static int pack(FlatBufferBuilder builder, BoneAnimationT _o) { + if (_o == null) return 0; + int _tracks = 0; + if (_o.getTracks() != null) { + int[] __tracks = new int[_o.getTracks().length]; + int _j = 0; + for (BoneTrackT _e : _o.getTracks()) { __tracks[_j] = BoneTrack.pack(builder, _e); _j++;} + _tracks = createTracksVector(builder, __tracks); + } + int _initData = _o.getInitData() == null ? 0 : BoneInit.pack(builder, _o.getInitData()); + return createBoneAnimation( + builder, + _tracks, + _initData); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimationT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimationT.java new file mode 100644 index 00000000..3584f916 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneAnimationT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class BoneAnimationT { + private BoneTrackT[] tracks; + private BoneInitT initData; + + public BoneTrackT[] getTracks() { return tracks; } + + public void setTracks(BoneTrackT[] tracks) { this.tracks = tracks; } + + public BoneInitT getInitData() { return initData; } + + public void setInitData(BoneInitT initData) { this.initData = initData; } + + + public BoneAnimationT() { + this.tracks = null; + this.initData = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInit.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInit.java new file mode 100644 index 00000000..e6fa16a4 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInit.java @@ -0,0 +1,67 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class BoneInit extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static BoneInit getRootAsBoneInit(ByteBuffer _bb) { return getRootAsBoneInit(_bb, new BoneInit()); } + public static BoneInit getRootAsBoneInit(ByteBuffer _bb, BoneInit obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BoneInit __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long isInit() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public Transform transform() { return transform(new Transform()); } + public Transform transform(Transform obj) { int o = __offset(6); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + + public static void startBoneInit(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addIsInit(FlatBufferBuilder builder, long isInit) { builder.addInt(0, (int) isInit, (int) 0L); } + public static void addTransform(FlatBufferBuilder builder, int transformOffset) { builder.addStruct(1, transformOffset, 0); } + public static int endBoneInit(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BoneInit get(int j) { return get(new BoneInit(), j); } + public BoneInit get(BoneInit obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public BoneInitT unpack() { + BoneInitT _o = new BoneInitT(); + unpackTo(_o); + return _o; + } + public void unpackTo(BoneInitT _o) { + long _oIsInit = isInit(); + _o.setIsInit(_oIsInit); + if (transform() != null) transform().unpackTo(_o.getTransform()); + else _o.setTransform(null); + } + public static int pack(FlatBufferBuilder builder, BoneInitT _o) { + if (_o == null) return 0; + startBoneInit(builder); + addIsInit(builder, _o.getIsInit()); + addTransform(builder, Transform.pack(builder, _o.getTransform())); + return endBoneInit(builder); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInitT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInitT.java new file mode 100644 index 00000000..f83add50 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneInitT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class BoneInitT { + private long isInit; + private TransformT transform; + + public long getIsInit() { return isInit; } + + public void setIsInit(long isInit) { this.isInit = isInit; } + + public TransformT getTransform() { return transform; } + + public void setTransform(TransformT transform) { this.transform = transform; } + + + public BoneInitT() { + this.isInit = 0L; + this.transform = new TransformT(); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrack.java new file mode 100644 index 00000000..18c2e152 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrack.java @@ -0,0 +1,180 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class BoneTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static BoneTrack getRootAsBoneTrack(ByteBuffer _bb) { return getRootAsBoneTrack(_bb, new BoneTrack()); } + public static BoneTrack getRootAsBoneTrack(ByteBuffer _bb, BoneTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public BoneTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public byte scaleType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table scale(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } + public byte rotateType() { int o = __offset(10); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table rotate(Table obj) { int o = __offset(12); return o != 0 ? __union(obj, o + bb_pos) : null; } + public byte translateType() { int o = __offset(14); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table translate(Table obj) { int o = __offset(16); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createBoneTrack(FlatBufferBuilder builder, + int nameOffset, + byte scaleType, + int scaleOffset, + byte rotateType, + int rotateOffset, + byte translateType, + int translateOffset) { + builder.startTable(7); + BoneTrack.addTranslate(builder, translateOffset); + BoneTrack.addRotate(builder, rotateOffset); + BoneTrack.addScale(builder, scaleOffset); + BoneTrack.addName(builder, nameOffset); + BoneTrack.addTranslateType(builder, translateType); + BoneTrack.addRotateType(builder, rotateType); + BoneTrack.addScaleType(builder, scaleType); + return BoneTrack.endBoneTrack(builder); + } + + public static void startBoneTrack(FlatBufferBuilder builder) { builder.startTable(7); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addScaleType(FlatBufferBuilder builder, byte scaleType) { builder.addByte(1, scaleType, 0); } + public static void addScale(FlatBufferBuilder builder, int scaleOffset) { builder.addOffset(2, scaleOffset, 0); } + public static void addRotateType(FlatBufferBuilder builder, byte rotateType) { builder.addByte(3, rotateType, 0); } + public static void addRotate(FlatBufferBuilder builder, int rotateOffset) { builder.addOffset(4, rotateOffset, 0); } + public static void addTranslateType(FlatBufferBuilder builder, byte translateType) { builder.addByte(5, translateType, 0); } + public static void addTranslate(FlatBufferBuilder builder, int translateOffset) { builder.addOffset(6, translateOffset, 0); } + public static int endBoneTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public BoneTrack get(int j) { return get(new BoneTrack(), j); } + public BoneTrack get(BoneTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public BoneTrackT unpack() { + BoneTrackT _o = new BoneTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(BoneTrackT _o) { + String _oName = name(); + _o.setName(_oName); + VectorTrackUnion _oScale = new VectorTrackUnion(); + byte _oScaleType = scaleType(); + _oScale.setType(_oScaleType); + Table _oScaleValue; + switch (_oScaleType) { + case VectorTrack.FixedVectorTrack: + _oScaleValue = scale(new FixedVectorTrack()); + _oScale.setValue(_oScaleValue != null ? ((FixedVectorTrack) _oScaleValue).unpack() : null); + break; + case VectorTrack.DynamicVectorTrack: + _oScaleValue = scale(new DynamicVectorTrack()); + _oScale.setValue(_oScaleValue != null ? ((DynamicVectorTrack) _oScaleValue).unpack() : null); + break; + case VectorTrack.Framed16VectorTrack: + _oScaleValue = scale(new Framed16VectorTrack()); + _oScale.setValue(_oScaleValue != null ? ((Framed16VectorTrack) _oScaleValue).unpack() : null); + break; + case VectorTrack.Framed8VectorTrack: + _oScaleValue = scale(new Framed8VectorTrack()); + _oScale.setValue(_oScaleValue != null ? ((Framed8VectorTrack) _oScaleValue).unpack() : null); + break; + default: break; + } + _o.setScale(_oScale); + RotationTrackUnion _oRotate = new RotationTrackUnion(); + byte _oRotateType = rotateType(); + _oRotate.setType(_oRotateType); + Table _oRotateValue; + switch (_oRotateType) { + case RotationTrack.FixedRotationTrack -> { + _oRotateValue = rotate(new FixedRotationTrack()); + _oRotate.setValue(_oRotateValue != null ? ((FixedRotationTrack) _oRotateValue).unpack() : null); + } + case RotationTrack.DynamicRotationTrack -> { + _oRotateValue = rotate(new DynamicRotationTrack()); + _oRotate.setValue(_oRotateValue != null ? ((DynamicRotationTrack) _oRotateValue).unpack() : null); + } + case RotationTrack.Framed16RotationTrack -> { + _oRotateValue = rotate(new Framed16RotationTrack()); + _oRotate.setValue(_oRotateValue != null ? ((Framed16RotationTrack) _oRotateValue).unpack() : null); + } + case RotationTrack.Framed8RotationTrack -> { + _oRotateValue = rotate(new Framed8RotationTrack()); + _oRotate.setValue(_oRotateValue != null ? ((Framed8RotationTrack) _oRotateValue).unpack() : null); + } + default -> { + } + } + _o.setRotate(_oRotate); + VectorTrackUnion _oTranslate = new VectorTrackUnion(); + byte _oTranslateType = translateType(); + _oTranslate.setType(_oTranslateType); + Table _oTranslateValue; + switch (_oTranslateType) { + case VectorTrack.FixedVectorTrack: + _oTranslateValue = translate(new FixedVectorTrack()); + _oTranslate.setValue(_oTranslateValue != null ? ((FixedVectorTrack) _oTranslateValue).unpack() : null); + break; + case VectorTrack.DynamicVectorTrack: + _oTranslateValue = translate(new DynamicVectorTrack()); + _oTranslate.setValue(_oTranslateValue != null ? ((DynamicVectorTrack) _oTranslateValue).unpack() : null); + break; + case VectorTrack.Framed16VectorTrack: + _oTranslateValue = translate(new Framed16VectorTrack()); + _oTranslate.setValue(_oTranslateValue != null ? ((Framed16VectorTrack) _oTranslateValue).unpack() : null); + break; + case VectorTrack.Framed8VectorTrack: + _oTranslateValue = translate(new Framed8VectorTrack()); + _oTranslate.setValue(_oTranslateValue != null ? ((Framed8VectorTrack) _oTranslateValue).unpack() : null); + break; + default: break; + } + _o.setTranslate(_oTranslate); + } + public static int pack(FlatBufferBuilder builder, BoneTrackT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + byte _scaleType = _o.getScale() == null ? VectorTrack.NONE : _o.getScale().getType(); + int _scale = _o.getScale() == null ? 0 : VectorTrackUnion.pack(builder, _o.getScale()); + byte _rotateType = _o.getRotate() == null ? RotationTrack.NONE : _o.getRotate().getType(); + int _rotate = _o.getRotate() == null ? 0 : RotationTrackUnion.pack(builder, _o.getRotate()); + byte _translateType = _o.getTranslate() == null ? VectorTrack.NONE : _o.getTranslate().getType(); + int _translate = _o.getTranslate() == null ? 0 : VectorTrackUnion.pack(builder, _o.getTranslate()); + return createBoneTrack( + builder, + _name, + _scaleType, + _scale, + _rotateType, + _rotate, + _translateType, + _translate); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrackT.java new file mode 100644 index 00000000..428bc752 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BoneTrackT.java @@ -0,0 +1,52 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class BoneTrackT { + private String name; + private VectorTrackUnion scale; + private RotationTrackUnion rotate; + private VectorTrackUnion translate; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public VectorTrackUnion getScale() { return scale; } + + public void setScale(VectorTrackUnion scale) { this.scale = scale; } + + public RotationTrackUnion getRotate() { return rotate; } + + public void setRotate(RotationTrackUnion rotate) { this.rotate = rotate; } + + public VectorTrackUnion getTranslate() { return translate; } + + public void setTranslate(VectorTrackUnion translate) { this.translate = translate; } + + + public BoneTrackT() { + this.name = null; + this.scale = null; + this.rotate = null; + this.translate = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrack.java new file mode 100644 index 00000000..b3da7983 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrack.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +@SuppressWarnings("unused") +public final class BooleanTrack { + private BooleanTrack() { } + public static final byte NONE = 0; + public static final byte FixedBooleanTrack = 1; + public static final byte DynamicBooleanTrack = 2; + public static final byte Framed16BooleanTrack = 3; + public static final byte Framed8BooleanTrack = 4; + + public static final String[] names = { "NONE", "FixedBooleanTrack", "DynamicBooleanTrack", "Framed16BooleanTrack", "Framed8BooleanTrack", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrackUnion.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrackUnion.java new file mode 100644 index 00000000..ead76cfe --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/BooleanTrackUnion.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class BooleanTrackUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public BooleanTrackUnion() { + this.type = BooleanTrack.NONE; + this.value = null; + } + + public FixedBooleanTrackT asFixedBooleanTrack() { return (FixedBooleanTrackT) value; } + public DynamicBooleanTrackT asDynamicBooleanTrack() { return (DynamicBooleanTrackT) value; } + public Framed16BooleanTrackT asFramed16BooleanTrack() { return (Framed16BooleanTrackT) value; } + public Framed8BooleanTrackT asFramed8BooleanTrack() { return (Framed8BooleanTrackT) value; } + + public static int pack(FlatBufferBuilder builder, BooleanTrackUnion _o) { + switch (_o.type) { + case BooleanTrack.FixedBooleanTrack: return FixedBooleanTrack.pack(builder, _o.asFixedBooleanTrack()); + case BooleanTrack.DynamicBooleanTrack: return DynamicBooleanTrack.pack(builder, _o.asDynamicBooleanTrack()); + case BooleanTrack.Framed16BooleanTrack: return Framed16BooleanTrack.pack(builder, _o.asFramed16BooleanTrack()); + case BooleanTrack.Framed8BooleanTrack: return Framed8BooleanTrack.pack(builder, _o.asFramed8BooleanTrack()); + default: return 0; + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrack.java new file mode 100644 index 00000000..6cfa1fde --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrack.java @@ -0,0 +1,68 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class ByteDataTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static ByteDataTrack getRootAsByteDataTrack(ByteBuffer _bb) { return getRootAsByteDataTrack(_bb, new ByteDataTrack()); } + public static ByteDataTrack getRootAsByteDataTrack(ByteBuffer _bb, ByteDataTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public ByteDataTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int value() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createByteDataTrack(FlatBufferBuilder builder, + int value) { + builder.startTable(1); + ByteDataTrack.addValue(builder, value); + return ByteDataTrack.endByteDataTrack(builder); + } + + public static void startByteDataTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addValue(FlatBufferBuilder builder, int value) { builder.addByte(0, (byte) value, (byte) 0); } + public static int endByteDataTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public ByteDataTrack get(int j) { return get(new ByteDataTrack(), j); } + public ByteDataTrack get(ByteDataTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ByteDataTrackT unpack() { + ByteDataTrackT _o = new ByteDataTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ByteDataTrackT _o) { + int _oValue = value(); + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, ByteDataTrackT _o) { + if (_o == null) return 0; + return createByteDataTrack( + builder, + _o.getValue()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrackT.java new file mode 100644 index 00000000..7fcc8770 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteDataTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class ByteDataTrackT { + private int value; + + public int getValue() { return value; } + + public void setValue(int value) { this.value = value; } + + + public ByteDataTrackT() { + this.value = 0; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrack.java new file mode 100644 index 00000000..3538d355 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrack.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +@SuppressWarnings("unused") +public final class ByteTrack { + private ByteTrack() { } + public static final byte NONE = 0; + public static final byte FixedByteTrack = 1; + public static final byte DynamicByteTrack = 2; + public static final byte Framed16ByteTrack = 3; + public static final byte Framed8ByteTrack = 4; + + public static final String[] names = { "NONE", "FixedByteTrack", "DynamicByteTrack", "Framed16ByteTrack", "Framed8ByteTrack", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrackUnion.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrackUnion.java new file mode 100644 index 00000000..af19a133 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ByteTrackUnion.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class ByteTrackUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public ByteTrackUnion() { + this.type = ByteTrack.NONE; + this.value = null; + } + + public FixedByteTrackT asFixedByteTrack() { return (FixedByteTrackT) value; } + public DynamicByteTrackT asDynamicByteTrack() { return (DynamicByteTrackT) value; } + public Framed16ByteTrackT asFramed16ByteTrack() { return (Framed16ByteTrackT) value; } + public Framed8ByteTrackT asFramed8ByteTrack() { return (Framed8ByteTrackT) value; } + + public static int pack(FlatBufferBuilder builder, ByteTrackUnion _o) { + switch (_o.type) { + case ByteTrack.FixedByteTrack: return FixedByteTrack.pack(builder, _o.asFixedByteTrack()); + case ByteTrack.DynamicByteTrack: return DynamicByteTrack.pack(builder, _o.asDynamicByteTrack()); + case ByteTrack.Framed16ByteTrack: return Framed16ByteTrack.pack(builder, _o.asFramed16ByteTrack()); + case ByteTrack.Framed8ByteTrack: return Framed8ByteTrack.pack(builder, _o.asFramed8ByteTrack()); + default: return 0; + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntry.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntry.java new file mode 100644 index 00000000..6b820f20 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntry.java @@ -0,0 +1,107 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class ColorEntry extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static ColorEntry getRootAsColorEntry(ByteBuffer _bb) { return getRootAsColorEntry(_bb, new ColorEntry()); } + public static ColorEntry getRootAsColorEntry(ByteBuffer _bb, ColorEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public ColorEntry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public byte colType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table col(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createColorEntry(FlatBufferBuilder builder, + int nameOffset, + byte colType, + int colOffset) { + builder.startTable(3); + ColorEntry.addCol(builder, colOffset); + ColorEntry.addName(builder, nameOffset); + ColorEntry.addColType(builder, colType); + return ColorEntry.endColorEntry(builder); + } + + public static void startColorEntry(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addColType(FlatBufferBuilder builder, byte colType) { builder.addByte(1, colType, 0); } + public static void addCol(FlatBufferBuilder builder, int colOffset) { builder.addOffset(2, colOffset, 0); } + public static int endColorEntry(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public ColorEntry get(int j) { return get(new ColorEntry(), j); } + public ColorEntry get(ColorEntry obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ColorEntryT unpack() { + ColorEntryT _o = new ColorEntryT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ColorEntryT _o) { + String _oName = name(); + _o.setName(_oName); + VectorTrackUnion _oCol = new VectorTrackUnion(); + byte _oColType = colType(); + _oCol.setType(_oColType); + Table _oColValue; + switch (_oColType) { + case VectorTrack.FixedVectorTrack: + _oColValue = col(new FixedVectorTrack()); + _oCol.setValue(_oColValue != null ? ((FixedVectorTrack) _oColValue).unpack() : null); + break; + case VectorTrack.DynamicVectorTrack: + _oColValue = col(new DynamicVectorTrack()); + _oCol.setValue(_oColValue != null ? ((DynamicVectorTrack) _oColValue).unpack() : null); + break; + case VectorTrack.Framed16VectorTrack: + _oColValue = col(new Framed16VectorTrack()); + _oCol.setValue(_oColValue != null ? ((Framed16VectorTrack) _oColValue).unpack() : null); + break; + case VectorTrack.Framed8VectorTrack: + _oColValue = col(new Framed8VectorTrack()); + _oCol.setValue(_oColValue != null ? ((Framed8VectorTrack) _oColValue).unpack() : null); + break; + default: break; + } + _o.setCol(_oCol); + } + public static int pack(FlatBufferBuilder builder, ColorEntryT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + byte _colType = _o.getCol() == null ? VectorTrack.NONE : _o.getCol().getType(); + int _col = _o.getCol() == null ? 0 : VectorTrackUnion.pack(builder, _o.getCol()); + return createColorEntry( + builder, + _name, + _colType, + _col); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntryT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntryT.java new file mode 100644 index 00000000..e5dee10d --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ColorEntryT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class ColorEntryT { + private String name; + private VectorTrackUnion col; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public VectorTrackUnion getCol() { return col; } + + public void setCol(VectorTrackUnion col) { this.col = col; } + + + public ColorEntryT() { + this.name = null; + this.col = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimation.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimation.java new file mode 100644 index 00000000..36eed949 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimation.java @@ -0,0 +1,82 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class CommandAnimation extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static CommandAnimation getRootAsCommandAnimation(ByteBuffer _bb) { return getRootAsCommandAnimation(_bb, new CommandAnimation()); } + public static CommandAnimation getRootAsCommandAnimation(ByteBuffer _bb, CommandAnimation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public CommandAnimation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public CommandTrack tracks(int j) { return tracks(new CommandTrack(), j); } + public CommandTrack tracks(CommandTrack obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int tracksLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public CommandTrack.Vector tracksVector() { return tracksVector(new CommandTrack.Vector()); } + public CommandTrack.Vector tracksVector(CommandTrack.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createCommandAnimation(FlatBufferBuilder builder, + int tracksOffset) { + builder.startTable(1); + CommandAnimation.addTracks(builder, tracksOffset); + return CommandAnimation.endCommandAnimation(builder); + } + + public static void startCommandAnimation(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTracks(FlatBufferBuilder builder, int tracksOffset) { builder.addOffset(0, tracksOffset, 0); } + public static int createTracksVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startTracksVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endCommandAnimation(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public CommandAnimation get(int j) { return get(new CommandAnimation(), j); } + public CommandAnimation get(CommandAnimation obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public CommandAnimationT unpack() { + CommandAnimationT _o = new CommandAnimationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(CommandAnimationT _o) { + CommandTrackT[] _oTracks = new CommandTrackT[tracksLength()]; + for (int _j = 0; _j < tracksLength(); ++_j) {_oTracks[_j] = (tracks(_j) != null ? tracks(_j).unpack() : null);} + _o.setTracks(_oTracks); + } + public static int pack(FlatBufferBuilder builder, CommandAnimationT _o) { + if (_o == null) return 0; + int _tracks = 0; + if (_o.getTracks() != null) { + int[] __tracks = new int[_o.getTracks().length]; + int _j = 0; + for (CommandTrackT _e : _o.getTracks()) { __tracks[_j] = CommandTrack.pack(builder, _e); _j++;} + _tracks = createTracksVector(builder, __tracks); + } + return createCommandAnimation( + builder, + _tracks); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimationT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimationT.java new file mode 100644 index 00000000..763df51f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandAnimationT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class CommandAnimationT { + private CommandTrackT[] tracks; + + public CommandTrackT[] getTracks() { return tracks; } + + public void setTracks(CommandTrackT[] tracks) { this.tracks = tracks; } + + + public CommandAnimationT() { + this.tracks = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntry.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntry.java new file mode 100644 index 00000000..72242455 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntry.java @@ -0,0 +1,107 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class CommandEntry extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static CommandEntry getRootAsCommandEntry(ByteBuffer _bb) { return getRootAsCommandEntry(_bb, new CommandEntry()); } + public static CommandEntry getRootAsCommandEntry(ByteBuffer _bb, CommandEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public CommandEntry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public byte tracksType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table tracks(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createCommandEntry(FlatBufferBuilder builder, + int nameOffset, + byte tracksType, + int tracksOffset) { + builder.startTable(3); + CommandEntry.addTracks(builder, tracksOffset); + CommandEntry.addName(builder, nameOffset); + CommandEntry.addTracksType(builder, tracksType); + return CommandEntry.endCommandEntry(builder); + } + + public static void startCommandEntry(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addTracksType(FlatBufferBuilder builder, byte tracksType) { builder.addByte(1, tracksType, 0); } + public static void addTracks(FlatBufferBuilder builder, int tracksOffset) { builder.addOffset(2, tracksOffset, 0); } + public static int endCommandEntry(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public CommandEntry get(int j) { return get(new CommandEntry(), j); } + public CommandEntry get(CommandEntry obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public CommandEntryT unpack() { + CommandEntryT _o = new CommandEntryT(); + unpackTo(_o); + return _o; + } + public void unpackTo(CommandEntryT _o) { + String _oName = name(); + _o.setName(_oName); + DataTrackUnion _oTracks = new DataTrackUnion(); + byte _oTracksType = tracksType(); + _oTracks.setType(_oTracksType); + Table _oTracksValue; + switch (_oTracksType) { + case DataTrack.IntDataTrack: + _oTracksValue = tracks(new IntDataTrack()); + _oTracks.setValue(_oTracksValue != null ? ((IntDataTrack) _oTracksValue).unpack() : null); + break; + case DataTrack.FloatDataTrack: + _oTracksValue = tracks(new FloatDataTrack()); + _oTracks.setValue(_oTracksValue != null ? ((FloatDataTrack) _oTracksValue).unpack() : null); + break; + case DataTrack.ByteDataTrack: + _oTracksValue = tracks(new ByteDataTrack()); + _oTracks.setValue(_oTracksValue != null ? ((ByteDataTrack) _oTracksValue).unpack() : null); + break; + case DataTrack.StringDataTrack: + _oTracksValue = tracks(new StringDataTrack()); + _oTracks.setValue(_oTracksValue != null ? ((StringDataTrack) _oTracksValue).unpack() : null); + break; + default: break; + } + _o.setTracks(_oTracks); + } + public static int pack(FlatBufferBuilder builder, CommandEntryT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + byte _tracksType = _o.getTracks() == null ? DataTrack.NONE : _o.getTracks().getType(); + int _tracks = _o.getTracks() == null ? 0 : DataTrackUnion.pack(builder, _o.getTracks()); + return createCommandEntry( + builder, + _name, + _tracksType, + _tracks); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntryT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntryT.java new file mode 100644 index 00000000..ed7fafc0 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandEntryT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class CommandEntryT { + private String name; + private DataTrackUnion tracks; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public DataTrackUnion getTracks() { return tracks; } + + public void setTracks(DataTrackUnion tracks) { this.tracks = tracks; } + + + public CommandEntryT() { + this.name = null; + this.tracks = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrack.java new file mode 100644 index 00000000..26cfa87c --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrack.java @@ -0,0 +1,106 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class CommandTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static CommandTrack getRootAsCommandTrack(ByteBuffer _bb) { return getRootAsCommandTrack(_bb, new CommandTrack()); } + public static CommandTrack getRootAsCommandTrack(ByteBuffer _bb, CommandTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public CommandTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public long frameStart() { int o = __offset(6); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public long frameLen() { int o = __offset(8); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public CommandEntry vec(int j) { return vec(new CommandEntry(), j); } + public CommandEntry vec(CommandEntry obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int vecLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public CommandEntry.Vector vecVector() { return vecVector(new CommandEntry.Vector()); } + public CommandEntry.Vector vecVector(CommandEntry.Vector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createCommandTrack(FlatBufferBuilder builder, + int nameOffset, + long frameStart, + long frameLen, + int vecOffset) { + builder.startTable(4); + CommandTrack.addVec(builder, vecOffset); + CommandTrack.addFrameLen(builder, frameLen); + CommandTrack.addFrameStart(builder, frameStart); + CommandTrack.addName(builder, nameOffset); + return CommandTrack.endCommandTrack(builder); + } + + public static void startCommandTrack(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addFrameStart(FlatBufferBuilder builder, long frameStart) { builder.addInt(1, (int) frameStart, (int) 0L); } + public static void addFrameLen(FlatBufferBuilder builder, long frameLen) { builder.addInt(2, (int) frameLen, (int) 0L); } + public static void addVec(FlatBufferBuilder builder, int vecOffset) { builder.addOffset(3, vecOffset, 0); } + public static int createVecVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startVecVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endCommandTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public CommandTrack get(int j) { return get(new CommandTrack(), j); } + public CommandTrack get(CommandTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public CommandTrackT unpack() { + CommandTrackT _o = new CommandTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(CommandTrackT _o) { + String _oName = name(); + _o.setName(_oName); + long _oFrameStart = frameStart(); + _o.setFrameStart(_oFrameStart); + long _oFrameLen = frameLen(); + _o.setFrameLen(_oFrameLen); + CommandEntryT[] _oVec = new CommandEntryT[vecLength()]; + for (int _j = 0; _j < vecLength(); ++_j) {_oVec[_j] = (vec(_j) != null ? vec(_j).unpack() : null);} + _o.setVec(_oVec); + } + public static int pack(FlatBufferBuilder builder, CommandTrackT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + int _vec = 0; + if (_o.getVec() != null) { + int[] __vec = new int[_o.getVec().length]; + int _j = 0; + for (CommandEntryT _e : _o.getVec()) { __vec[_j] = CommandEntry.pack(builder, _e); _j++;} + _vec = createVecVector(builder, __vec); + } + return createCommandTrack( + builder, + _name, + _o.getFrameStart(), + _o.getFrameLen(), + _vec); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrackT.java new file mode 100644 index 00000000..5fe2d343 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/CommandTrackT.java @@ -0,0 +1,52 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class CommandTrackT { + private String name; + private long frameStart; + private long frameLen; + private CommandEntryT[] vec; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public long getFrameStart() { return frameStart; } + + public void setFrameStart(long frameStart) { this.frameStart = frameStart; } + + public long getFrameLen() { return frameLen; } + + public void setFrameLen(long frameLen) { this.frameLen = frameLen; } + + public CommandEntryT[] getVec() { return vec; } + + public void setVec(CommandEntryT[] vec) { this.vec = vec; } + + + public CommandTrackT() { + this.name = null; + this.frameStart = 0L; + this.frameLen = 0L; + this.vec = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrack.java new file mode 100644 index 00000000..60314446 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrack.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +@SuppressWarnings("unused") +public final class DataTrack { + private DataTrack() { } + public static final byte NONE = 0; + public static final byte IntDataTrack = 1; + public static final byte FloatDataTrack = 2; + public static final byte ByteDataTrack = 3; + public static final byte StringDataTrack = 4; + + public static final String[] names = { "NONE", "IntDataTrack", "FloatDataTrack", "ByteDataTrack", "StringDataTrack", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrackUnion.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrackUnion.java new file mode 100644 index 00000000..b838bce0 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DataTrackUnion.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class DataTrackUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public DataTrackUnion() { + this.type = DataTrack.NONE; + this.value = null; + } + + public IntDataTrackT asIntDataTrack() { return (IntDataTrackT) value; } + public FloatDataTrackT asFloatDataTrack() { return (FloatDataTrackT) value; } + public ByteDataTrackT asByteDataTrack() { return (ByteDataTrackT) value; } + public StringDataTrackT asStringDataTrack() { return (StringDataTrackT) value; } + + public static int pack(FlatBufferBuilder builder, DataTrackUnion _o) { + switch (_o.type) { + case DataTrack.IntDataTrack: return IntDataTrack.pack(builder, _o.asIntDataTrack()); + case DataTrack.FloatDataTrack: return FloatDataTrack.pack(builder, _o.asFloatDataTrack()); + case DataTrack.ByteDataTrack: return ByteDataTrack.pack(builder, _o.asByteDataTrack()); + case DataTrack.StringDataTrack: return StringDataTrack.pack(builder, _o.asStringDataTrack()); + default: return 0; + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrack.java new file mode 100644 index 00000000..64ab69b7 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrack.java @@ -0,0 +1,80 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class DynamicBooleanTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static DynamicBooleanTrack getRootAsDynamicBooleanTrack(ByteBuffer _bb) { return getRootAsDynamicBooleanTrack(_bb, new DynamicBooleanTrack()); } + public static DynamicBooleanTrack getRootAsDynamicBooleanTrack(ByteBuffer _bb, DynamicBooleanTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public DynamicBooleanTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean bool(int j) { int o = __offset(4); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int boolLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public BooleanVector boolVector() { return boolVector(new BooleanVector()); } + public BooleanVector boolVector(BooleanVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer boolAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer boolInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createDynamicBooleanTrack(FlatBufferBuilder builder, + int boolOffset) { + builder.startTable(1); + DynamicBooleanTrack.addBool(builder, boolOffset); + return DynamicBooleanTrack.endDynamicBooleanTrack(builder); + } + + public static void startDynamicBooleanTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addBool(FlatBufferBuilder builder, int boolOffset) { builder.addOffset(0, boolOffset, 0); } + public static int createBoolVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startBoolVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endDynamicBooleanTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public DynamicBooleanTrack get(int j) { return get(new DynamicBooleanTrack(), j); } + public DynamicBooleanTrack get(DynamicBooleanTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DynamicBooleanTrackT unpack() { + DynamicBooleanTrackT _o = new DynamicBooleanTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DynamicBooleanTrackT _o) { + boolean[] _oBool = new boolean[boolLength()]; + for (int _j = 0; _j < boolLength(); ++_j) {_oBool[_j] = bool(_j);} + _o.setBool(_oBool); + } + public static int pack(FlatBufferBuilder builder, DynamicBooleanTrackT _o) { + if (_o == null) return 0; + int _bool = 0; + if (_o.getBool() != null) { + _bool = createBoolVector(builder, _o.getBool()); + } + return createDynamicBooleanTrack( + builder, + _bool); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrackT.java new file mode 100644 index 00000000..fae55ff7 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicBooleanTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class DynamicBooleanTrackT { + private boolean[] bool; + + public boolean[] getBool() { return bool; } + + public void setBool(boolean[] bool) { this.bool = bool; } + + + public DynamicBooleanTrackT() { + this.bool = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrack.java new file mode 100644 index 00000000..1d28d5dd --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrack.java @@ -0,0 +1,84 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class DynamicByteTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static DynamicByteTrack getRootAsDynamicByteTrack(ByteBuffer _bb) { return getRootAsDynamicByteTrack(_bb, new DynamicByteTrack()); } + public static DynamicByteTrack getRootAsDynamicByteTrack(ByteBuffer _bb, DynamicByteTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public DynamicByteTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int byte_(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int byte_Length() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector byteVector() { return byteVector(new ByteVector()); } + public ByteVector byteVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer byte_AsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer byte_InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createDynamicByteTrack(FlatBufferBuilder builder, + int byte_Offset) { + builder.startTable(1); + DynamicByteTrack.addByte(builder, byte_Offset); + return DynamicByteTrack.endDynamicByteTrack(builder); + } + + public static void startDynamicByteTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addByte(FlatBufferBuilder builder, int byte_Offset) { builder.addOffset(0, byte_Offset, 0); } + public static int createByteVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createByteVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startByteVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endDynamicByteTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public DynamicByteTrack get(int j) { return get(new DynamicByteTrack(), j); } + public DynamicByteTrack get(DynamicByteTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DynamicByteTrackT unpack() { + DynamicByteTrackT _o = new DynamicByteTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DynamicByteTrackT _o) { + int[] _oByte = new int[byte_Length()]; + for (int _j = 0; _j < byte_Length(); ++_j) {_oByte[_j] = byte_(_j);} + _o.setByte(_oByte); + } + public static int pack(FlatBufferBuilder builder, DynamicByteTrackT _o) { + if (_o == null) return 0; + int _byte_ = 0; + if (_o.getByte() != null) { + byte[] __byte_ = new byte[_o.getByte().length]; + int _j = 0; + for (int _e : _o.getByte()) { __byte_[_j] = (byte) _e; _j++;} + _byte_ = createByteVector(builder, __byte_); + } + return createDynamicByteTrack( + builder, + _byte_); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrackT.java new file mode 100644 index 00000000..ba53992e --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicByteTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class DynamicByteTrackT { + private int[] byte_; + + public int[] getByte() { return byte_; } + + public void setByte(int[] byte_) { this.byte_ = byte_; } + + + public DynamicByteTrackT() { + this.byte_ = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrack.java new file mode 100644 index 00000000..23d749bc --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrack.java @@ -0,0 +1,80 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class DynamicFloatTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static DynamicFloatTrack getRootAsDynamicFloatTrack(ByteBuffer _bb) { return getRootAsDynamicFloatTrack(_bb, new DynamicFloatTrack()); } + public static DynamicFloatTrack getRootAsDynamicFloatTrack(ByteBuffer _bb, DynamicFloatTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public DynamicFloatTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float float_(int j) { int o = __offset(4); return o != 0 ? bb.getFloat(__vector(o) + j * 4) : 0; } + public int float_Length() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public FloatVector floatVector() { return floatVector(new FloatVector()); } + public FloatVector floatVector(FloatVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer float_AsByteBuffer() { return __vector_as_bytebuffer(4, 4); } + public ByteBuffer float_InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 4); } + + public static int createDynamicFloatTrack(FlatBufferBuilder builder, + int float_Offset) { + builder.startTable(1); + DynamicFloatTrack.addFloat(builder, float_Offset); + return DynamicFloatTrack.endDynamicFloatTrack(builder); + } + + public static void startDynamicFloatTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addFloat(FlatBufferBuilder builder, int float_Offset) { builder.addOffset(0, float_Offset, 0); } + public static int createFloatVector(FlatBufferBuilder builder, float[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addFloat(data[i]); return builder.endVector(); } + public static void startFloatVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endDynamicFloatTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public DynamicFloatTrack get(int j) { return get(new DynamicFloatTrack(), j); } + public DynamicFloatTrack get(DynamicFloatTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DynamicFloatTrackT unpack() { + DynamicFloatTrackT _o = new DynamicFloatTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DynamicFloatTrackT _o) { + float[] _oFloat = new float[float_Length()]; + for (int _j = 0; _j < float_Length(); ++_j) {_oFloat[_j] = float_(_j);} + _o.setFloat(_oFloat); + } + public static int pack(FlatBufferBuilder builder, DynamicFloatTrackT _o) { + if (_o == null) return 0; + int _float_ = 0; + if (_o.getFloat() != null) { + _float_ = createFloatVector(builder, _o.getFloat()); + } + return createDynamicFloatTrack( + builder, + _float_); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrackT.java new file mode 100644 index 00000000..bccdc2fa --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicFloatTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class DynamicFloatTrackT { + private float[] float_; + + public float[] getFloat() { return float_; } + + public void setFloat(float[] float_) { this.float_ = float_; } + + + public DynamicFloatTrackT() { + this.float_ = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrack.java new file mode 100644 index 00000000..c160da2e --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrack.java @@ -0,0 +1,82 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class DynamicRotationTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static DynamicRotationTrack getRootAsDynamicRotationTrack(ByteBuffer _bb) { return getRootAsDynamicRotationTrack(_bb, new DynamicRotationTrack()); } + public static DynamicRotationTrack getRootAsDynamicRotationTrack(ByteBuffer _bb, DynamicRotationTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public DynamicRotationTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public sVec3 co(int j) { return co(new sVec3(), j); } + public sVec3 co(sVec3 obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o) + j * 6, bb) : null; } + public int coLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public sVec3.Vector coVector() { return coVector(new sVec3.Vector()); } + public sVec3.Vector coVector(sVec3.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 6, bb) : null; } + + public static int createDynamicRotationTrack(FlatBufferBuilder builder, + int coOffset) { + builder.startTable(1); + DynamicRotationTrack.addCo(builder, coOffset); + return DynamicRotationTrack.endDynamicRotationTrack(builder); + } + + public static void startDynamicRotationTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addOffset(0, coOffset, 0); } + public static void startCoVector(FlatBufferBuilder builder, int numElems) { builder.startVector(6, numElems, 2); } + public static int endDynamicRotationTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public DynamicRotationTrack get(int j) { return get(new DynamicRotationTrack(), j); } + public DynamicRotationTrack get(DynamicRotationTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DynamicRotationTrackT unpack() { + DynamicRotationTrackT _o = new DynamicRotationTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DynamicRotationTrackT _o) { + sVec3T[] _oCo = new sVec3T[coLength()]; + for (int _j = 0; _j < coLength(); ++_j) {_oCo[_j] = (co(_j) != null ? co(_j).unpack() : null);} + _o.setCo(_oCo); + } + public static int pack(FlatBufferBuilder builder, DynamicRotationTrackT _o) { + if (_o == null) return 0; + int _co = 0; + sVec3T[] _oCo = _o.getCo(); + if (_oCo != null) { + int _unused_offset = 0; + startCoVector(builder, _oCo.length); + for (int _j = _oCo.length - 1; _j >=0; _j--) { _unused_offset = sVec3.pack(builder, _oCo[_j]);} + _co = builder.endVector(); + } + return createDynamicRotationTrack( + builder, + _co); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrackT.java new file mode 100644 index 00000000..0ded7453 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicRotationTrackT.java @@ -0,0 +1,29 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import gg.generations.rarecandy.renderer.animation.TranmUtil; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Quaternionf; + +public class DynamicRotationTrackT implements RotationTrackUnion.TrackProcesser { + private sVec3T[] co; + + public sVec3T[] getCo() { return co; } + + public void setCo(sVec3T[] co) { this.co = co; } + + + public DynamicRotationTrackT() { + this.co = null; + } + + @Override + public void process(TransformStorage rotationKeys) { + for (int i = 0; i < co.length; i++) { + var vec = co[i]; + rotationKeys.add(i, TranmUtil.packedToQuat((short) vec.getX(), (short) vec.getY(), (short) vec.getZ())); + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrack.java new file mode 100644 index 00000000..cf47cbc4 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrack.java @@ -0,0 +1,82 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class DynamicVectorTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static DynamicVectorTrack getRootAsDynamicVectorTrack(ByteBuffer _bb) { return getRootAsDynamicVectorTrack(_bb, new DynamicVectorTrack()); } + public static DynamicVectorTrack getRootAsDynamicVectorTrack(ByteBuffer _bb, DynamicVectorTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public DynamicVectorTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public Vec3 co(int j) { return co(new Vec3(), j); } + public Vec3 co(Vec3 obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o) + j * 12, bb) : null; } + public int coLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public Vec3.Vector coVector() { return coVector(new Vec3.Vector()); } + public Vec3.Vector coVector(Vec3.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 12, bb) : null; } + + public static int createDynamicVectorTrack(FlatBufferBuilder builder, + int coOffset) { + builder.startTable(1); + DynamicVectorTrack.addCo(builder, coOffset); + return DynamicVectorTrack.endDynamicVectorTrack(builder); + } + + public static void startDynamicVectorTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addOffset(0, coOffset, 0); } + public static void startCoVector(FlatBufferBuilder builder, int numElems) { builder.startVector(12, numElems, 4); } + public static int endDynamicVectorTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public DynamicVectorTrack get(int j) { return get(new DynamicVectorTrack(), j); } + public DynamicVectorTrack get(DynamicVectorTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public DynamicVectorTrackT unpack() { + DynamicVectorTrackT _o = new DynamicVectorTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(DynamicVectorTrackT _o) { + Vec3T[] _oCo = new Vec3T[coLength()]; + for (int _j = 0; _j < coLength(); ++_j) {_oCo[_j] = (co(_j) != null ? co(_j).unpack() : null);} + _o.setCo(_oCo); + } + public static int pack(FlatBufferBuilder builder, DynamicVectorTrackT _o) { + if (_o == null) return 0; + int _co = 0; + Vec3T[] _oCo = _o.getCo(); + if (_oCo != null) { + int _unused_offset = 0; + startCoVector(builder, _oCo.length); + for (int _j = _oCo.length - 1; _j >=0; _j--) { _unused_offset = Vec3.pack(builder, _oCo[_j]);} + _co = builder.endVector(); + } + return createDynamicVectorTrack( + builder, + _co); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrackT.java new file mode 100644 index 00000000..916eff1e --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/DynamicVectorTrackT.java @@ -0,0 +1,46 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Vector3f; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class DynamicVectorTrackT implements RotationTrackUnion.TrackProcesser { + private Vec3T[] co; + + public Vec3T[] getCo() { return co; } + + public void setCo(Vec3T[] co) { this.co = co; } + + + public DynamicVectorTrackT() { + this.co = null; + } + + @Override + public void process(TransformStorage keys) { + for (int i = 0; i < co.length; i++) { + var vec = getCo()[i]; + keys.add(i, new Vector3f(vec.getX(), vec.getY(), vec.getZ())); + } + + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrack.java new file mode 100644 index 00000000..453fef2d --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrack.java @@ -0,0 +1,68 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class FixedBooleanTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static FixedBooleanTrack getRootAsFixedBooleanTrack(ByteBuffer _bb) { return getRootAsFixedBooleanTrack(_bb, new FixedBooleanTrack()); } + public static FixedBooleanTrack getRootAsFixedBooleanTrack(ByteBuffer _bb, FixedBooleanTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public FixedBooleanTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public boolean bool() { int o = __offset(4); return o != 0 ? 0!=bb.get(o + bb_pos) : false; } + + public static int createFixedBooleanTrack(FlatBufferBuilder builder, + boolean bool) { + builder.startTable(1); + FixedBooleanTrack.addBool(builder, bool); + return FixedBooleanTrack.endFixedBooleanTrack(builder); + } + + public static void startFixedBooleanTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addBool(FlatBufferBuilder builder, boolean bool) { builder.addBoolean(0, bool, false); } + public static int endFixedBooleanTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public FixedBooleanTrack get(int j) { return get(new FixedBooleanTrack(), j); } + public FixedBooleanTrack get(FixedBooleanTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FixedBooleanTrackT unpack() { + FixedBooleanTrackT _o = new FixedBooleanTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FixedBooleanTrackT _o) { + boolean _oBool = bool(); + _o.setBool(_oBool); + } + public static int pack(FlatBufferBuilder builder, FixedBooleanTrackT _o) { + if (_o == null) return 0; + return createFixedBooleanTrack( + builder, + _o.getBool()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrackT.java new file mode 100644 index 00000000..a652a2d0 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedBooleanTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class FixedBooleanTrackT { + private boolean bool; + + public boolean getBool() { return bool; } + + public void setBool(boolean bool) { this.bool = bool; } + + + public FixedBooleanTrackT() { + this.bool = false; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrack.java new file mode 100644 index 00000000..72635af9 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrack.java @@ -0,0 +1,68 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class FixedByteTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static FixedByteTrack getRootAsFixedByteTrack(ByteBuffer _bb) { return getRootAsFixedByteTrack(_bb, new FixedByteTrack()); } + public static FixedByteTrack getRootAsFixedByteTrack(ByteBuffer _bb, FixedByteTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public FixedByteTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int byte_() { int o = __offset(4); return o != 0 ? bb.get(o + bb_pos) & 0xFF : 0; } + + public static int createFixedByteTrack(FlatBufferBuilder builder, + int byte_) { + builder.startTable(1); + FixedByteTrack.addByte(builder, byte_); + return FixedByteTrack.endFixedByteTrack(builder); + } + + public static void startFixedByteTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addByte(FlatBufferBuilder builder, int byte_) { builder.addByte(0, (byte) byte_, (byte) 0); } + public static int endFixedByteTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public FixedByteTrack get(int j) { return get(new FixedByteTrack(), j); } + public FixedByteTrack get(FixedByteTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FixedByteTrackT unpack() { + FixedByteTrackT _o = new FixedByteTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FixedByteTrackT _o) { + int _oByte = byte_(); + _o.setByte(_oByte); + } + public static int pack(FlatBufferBuilder builder, FixedByteTrackT _o) { + if (_o == null) return 0; + return createFixedByteTrack( + builder, + _o.getByte()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrackT.java new file mode 100644 index 00000000..0f866862 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedByteTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class FixedByteTrackT { + private int byte_; + + public int getByte() { return byte_; } + + public void setByte(int byte_) { this.byte_ = byte_; } + + + public FixedByteTrackT() { + this.byte_ = 0; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrack.java new file mode 100644 index 00000000..37286a20 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrack.java @@ -0,0 +1,68 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class FixedFloatTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static FixedFloatTrack getRootAsFixedFloatTrack(ByteBuffer _bb) { return getRootAsFixedFloatTrack(_bb, new FixedFloatTrack()); } + public static FixedFloatTrack getRootAsFixedFloatTrack(ByteBuffer _bb, FixedFloatTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public FixedFloatTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float float_() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createFixedFloatTrack(FlatBufferBuilder builder, + float float_) { + builder.startTable(1); + FixedFloatTrack.addFloat(builder, float_); + return FixedFloatTrack.endFixedFloatTrack(builder); + } + + public static void startFixedFloatTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addFloat(FlatBufferBuilder builder, float float_) { builder.addFloat(0, float_, 0.0f); } + public static int endFixedFloatTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public FixedFloatTrack get(int j) { return get(new FixedFloatTrack(), j); } + public FixedFloatTrack get(FixedFloatTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FixedFloatTrackT unpack() { + FixedFloatTrackT _o = new FixedFloatTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FixedFloatTrackT _o) { + float _oFloat = float_(); + _o.setFloat(_oFloat); + } + public static int pack(FlatBufferBuilder builder, FixedFloatTrackT _o) { + if (_o == null) return 0; + return createFixedFloatTrack( + builder, + _o.getFloat()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrackT.java new file mode 100644 index 00000000..c1c3a0ab --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedFloatTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class FixedFloatTrackT { + private float float_; + + public float getFloat() { return float_; } + + public void setFloat(float float_) { this.float_ = float_; } + + + public FixedFloatTrackT() { + this.float_ = 0.0f; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrack.java new file mode 100644 index 00000000..1cecd9c2 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrack.java @@ -0,0 +1,62 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class FixedRotationTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static FixedRotationTrack getRootAsFixedRotationTrack(ByteBuffer _bb) { return getRootAsFixedRotationTrack(_bb, new FixedRotationTrack()); } + public static FixedRotationTrack getRootAsFixedRotationTrack(ByteBuffer _bb, FixedRotationTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public FixedRotationTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public sVec3 co() { return co(new sVec3()); } + public sVec3 co(sVec3 obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + + public static void startFixedRotationTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addStruct(0, coOffset, 0); } + public static int endFixedRotationTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public FixedRotationTrack get(int j) { return get(new FixedRotationTrack(), j); } + public FixedRotationTrack get(FixedRotationTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FixedRotationTrackT unpack() { + FixedRotationTrackT _o = new FixedRotationTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FixedRotationTrackT _o) { + if (co() != null) co().unpackTo(_o.getCo()); + else _o.setCo(null); + } + public static int pack(FlatBufferBuilder builder, FixedRotationTrackT _o) { + if (_o == null) return 0; + startFixedRotationTrack(builder); + addCo(builder, sVec3.pack(builder, _o.getCo())); + return endFixedRotationTrack(builder); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrackT.java new file mode 100644 index 00000000..43f11fd7 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedRotationTrackT.java @@ -0,0 +1,26 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import gg.generations.rarecandy.renderer.animation.TranmUtil; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Quaternionf; + +public class FixedRotationTrackT implements RotationTrackUnion.TrackProcesser { + private sVec3T co; + + public sVec3T getCo() { return co; } + + public void setCo(sVec3T co) { this.co = co; } + + + public FixedRotationTrackT() { + this.co = new sVec3T(); + } + + @Override + public void process(TransformStorage rotationKeys) { + rotationKeys.add(0, TranmUtil.packedToQuat((short) co.getX(), (short) co.getY(), (short) co.getZ())); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrack.java new file mode 100644 index 00000000..d3947113 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrack.java @@ -0,0 +1,62 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class FixedVectorTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static FixedVectorTrack getRootAsFixedVectorTrack(ByteBuffer _bb) { return getRootAsFixedVectorTrack(_bb, new FixedVectorTrack()); } + public static FixedVectorTrack getRootAsFixedVectorTrack(ByteBuffer _bb, FixedVectorTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public FixedVectorTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public Vec3 co() { return co(new Vec3()); } + public Vec3 co(Vec3 obj) { int o = __offset(4); return o != 0 ? obj.__assign(o + bb_pos, bb) : null; } + + public static void startFixedVectorTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addStruct(0, coOffset, 0); } + public static int endFixedVectorTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public FixedVectorTrack get(int j) { return get(new FixedVectorTrack(), j); } + public FixedVectorTrack get(FixedVectorTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FixedVectorTrackT unpack() { + FixedVectorTrackT _o = new FixedVectorTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FixedVectorTrackT _o) { + if (co() != null) co().unpackTo(_o.getCo()); + else _o.setCo(null); + } + public static int pack(FlatBufferBuilder builder, FixedVectorTrackT _o) { + if (_o == null) return 0; + startFixedVectorTrack(builder); + addCo(builder, Vec3.pack(builder, _o.getCo())); + return endFixedVectorTrack(builder); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrackT.java new file mode 100644 index 00000000..5e734c76 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FixedVectorTrackT.java @@ -0,0 +1,42 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Vector3f; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class FixedVectorTrackT implements RotationTrackUnion.TrackProcesser { + private Vec3T co; + + public Vec3T getCo() { return co; } + + public void setCo(Vec3T co) { this.co = co; } + + + public FixedVectorTrackT() { + this.co = new Vec3T(); + } + + @Override + public void process(TransformStorage keys) { + keys.add(0, new Vector3f(co.getX(), co.getY(), co.getZ())); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntry.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntry.java new file mode 100644 index 00000000..3fd5df86 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntry.java @@ -0,0 +1,107 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class FlagEntry extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static FlagEntry getRootAsFlagEntry(ByteBuffer _bb) { return getRootAsFlagEntry(_bb, new FlagEntry()); } + public static FlagEntry getRootAsFlagEntry(ByteBuffer _bb, FlagEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public FlagEntry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public byte flagType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table flag(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createFlagEntry(FlatBufferBuilder builder, + int nameOffset, + byte flagType, + int flagOffset) { + builder.startTable(3); + FlagEntry.addFlag(builder, flagOffset); + FlagEntry.addName(builder, nameOffset); + FlagEntry.addFlagType(builder, flagType); + return FlagEntry.endFlagEntry(builder); + } + + public static void startFlagEntry(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addFlagType(FlatBufferBuilder builder, byte flagType) { builder.addByte(1, flagType, 0); } + public static void addFlag(FlatBufferBuilder builder, int flagOffset) { builder.addOffset(2, flagOffset, 0); } + public static int endFlagEntry(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public FlagEntry get(int j) { return get(new FlagEntry(), j); } + public FlagEntry get(FlagEntry obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FlagEntryT unpack() { + FlagEntryT _o = new FlagEntryT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FlagEntryT _o) { + String _oName = name(); + _o.setName(_oName); + BooleanTrackUnion _oFlag = new BooleanTrackUnion(); + byte _oFlagType = flagType(); + _oFlag.setType(_oFlagType); + Table _oFlagValue; + switch (_oFlagType) { + case BooleanTrack.FixedBooleanTrack: + _oFlagValue = flag(new FixedBooleanTrack()); + _oFlag.setValue(_oFlagValue != null ? ((FixedBooleanTrack) _oFlagValue).unpack() : null); + break; + case BooleanTrack.DynamicBooleanTrack: + _oFlagValue = flag(new DynamicBooleanTrack()); + _oFlag.setValue(_oFlagValue != null ? ((DynamicBooleanTrack) _oFlagValue).unpack() : null); + break; + case BooleanTrack.Framed16BooleanTrack: + _oFlagValue = flag(new Framed16BooleanTrack()); + _oFlag.setValue(_oFlagValue != null ? ((Framed16BooleanTrack) _oFlagValue).unpack() : null); + break; + case BooleanTrack.Framed8BooleanTrack: + _oFlagValue = flag(new Framed8BooleanTrack()); + _oFlag.setValue(_oFlagValue != null ? ((Framed8BooleanTrack) _oFlagValue).unpack() : null); + break; + default: break; + } + _o.setFlag(_oFlag); + } + public static int pack(FlatBufferBuilder builder, FlagEntryT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + byte _flagType = _o.getFlag() == null ? BooleanTrack.NONE : _o.getFlag().getType(); + int _flag = _o.getFlag() == null ? 0 : BooleanTrackUnion.pack(builder, _o.getFlag()); + return createFlagEntry( + builder, + _name, + _flagType, + _flag); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntryT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntryT.java new file mode 100644 index 00000000..37a8daa2 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FlagEntryT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class FlagEntryT { + private String name; + private BooleanTrackUnion flag; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public BooleanTrackUnion getFlag() { return flag; } + + public void setFlag(BooleanTrackUnion flag) { this.flag = flag; } + + + public FlagEntryT() { + this.name = null; + this.flag = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrack.java new file mode 100644 index 00000000..e9f068c2 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrack.java @@ -0,0 +1,68 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class FloatDataTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static FloatDataTrack getRootAsFloatDataTrack(ByteBuffer _bb) { return getRootAsFloatDataTrack(_bb, new FloatDataTrack()); } + public static FloatDataTrack getRootAsFloatDataTrack(ByteBuffer _bb, FloatDataTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public FloatDataTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float value() { int o = __offset(4); return o != 0 ? bb.getFloat(o + bb_pos) : 0.0f; } + + public static int createFloatDataTrack(FlatBufferBuilder builder, + float value) { + builder.startTable(1); + FloatDataTrack.addValue(builder, value); + return FloatDataTrack.endFloatDataTrack(builder); + } + + public static void startFloatDataTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addValue(FlatBufferBuilder builder, float value) { builder.addFloat(0, value, 0.0f); } + public static int endFloatDataTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public FloatDataTrack get(int j) { return get(new FloatDataTrack(), j); } + public FloatDataTrack get(FloatDataTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public FloatDataTrackT unpack() { + FloatDataTrackT _o = new FloatDataTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(FloatDataTrackT _o) { + float _oValue = value(); + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, FloatDataTrackT _o) { + if (_o == null) return 0; + return createFloatDataTrack( + builder, + _o.getValue()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrackT.java new file mode 100644 index 00000000..bc21937f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatDataTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class FloatDataTrackT { + private float value; + + public float getValue() { return value; } + + public void setValue(float value) { this.value = value; } + + + public FloatDataTrackT() { + this.value = 0.0f; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrack.java new file mode 100644 index 00000000..b1e4d776 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrack.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +@SuppressWarnings("unused") +public final class FloatTrack { + private FloatTrack() { } + public static final byte NONE = 0; + public static final byte FixedFloatTrack = 1; + public static final byte DynamicFloatTrack = 2; + public static final byte Framed16FloatTrack = 3; + public static final byte Framed8FloatTrack = 4; + + public static final String[] names = { "NONE", "FixedFloatTrack", "DynamicFloatTrack", "Framed16FloatTrack", "Framed8FloatTrack", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrackUnion.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrackUnion.java new file mode 100644 index 00000000..8dd2b099 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/FloatTrackUnion.java @@ -0,0 +1,39 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.FlatBufferBuilder; + +public class FloatTrackUnion { + private byte type; + private Object value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public Object getValue() { return value; } + + public void setValue(Object value) { this.value = value; } + + public FloatTrackUnion() { + this.type = FloatTrack.NONE; + this.value = null; + } + + public FixedFloatTrackT asFixedFloatTrack() { return (FixedFloatTrackT) value; } + public DynamicFloatTrackT asDynamicFloatTrack() { return (DynamicFloatTrackT) value; } + public Framed16FloatTrackT asFramed16FloatTrack() { return (Framed16FloatTrackT) value; } + public Framed8FloatTrackT asFramed8FloatTrack() { return (Framed8FloatTrackT) value; } + + public static int pack(FlatBufferBuilder builder, FloatTrackUnion _o) { + switch (_o.type) { + case FloatTrack.FixedFloatTrack: return FixedFloatTrack.pack(builder, _o.asFixedFloatTrack()); + case FloatTrack.DynamicFloatTrack: return DynamicFloatTrack.pack(builder, _o.asDynamicFloatTrack()); + case FloatTrack.Framed16FloatTrack: return Framed16FloatTrack.pack(builder, _o.asFramed16FloatTrack()); + case FloatTrack.Framed8FloatTrack: return Framed8FloatTrack.pack(builder, _o.asFramed8FloatTrack()); + default: return 0; + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrack.java new file mode 100644 index 00000000..bdca2ff8 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrack.java @@ -0,0 +1,99 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed16BooleanTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed16BooleanTrack getRootAsFramed16BooleanTrack(ByteBuffer _bb) { return getRootAsFramed16BooleanTrack(_bb, new Framed16BooleanTrack()); } + public static Framed16BooleanTrack getRootAsFramed16BooleanTrack(ByteBuffer _bb, Framed16BooleanTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed16BooleanTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.getShort(__vector(o) + j * 2) & 0xFFFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ShortVector framesVector() { return framesVector(new ShortVector()); } + public ShortVector framesVector(ShortVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 2); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 2); } + public boolean bool(int j) { int o = __offset(6); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int boolLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public BooleanVector boolVector() { return boolVector(new BooleanVector()); } + public BooleanVector boolVector(BooleanVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer boolAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer boolInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createFramed16BooleanTrack(FlatBufferBuilder builder, + int framesOffset, + int boolOffset) { + builder.startTable(2); + Framed16BooleanTrack.addBool(builder, boolOffset); + Framed16BooleanTrack.addFrames(builder, framesOffset); + return Framed16BooleanTrack.endFramed16BooleanTrack(builder); + } + + public static void startFramed16BooleanTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(2, data.length, 2); for (int i = data.length - 1; i >= 0; i--) builder.addShort((short) data[i]); return builder.endVector(); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(2, numElems, 2); } + public static void addBool(FlatBufferBuilder builder, int boolOffset) { builder.addOffset(1, boolOffset, 0); } + public static int createBoolVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startBoolVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endFramed16BooleanTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed16BooleanTrack get(int j) { return get(new Framed16BooleanTrack(), j); } + public Framed16BooleanTrack get(Framed16BooleanTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed16BooleanTrackT unpack() { + Framed16BooleanTrackT _o = new Framed16BooleanTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed16BooleanTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + boolean[] _oBool = new boolean[boolLength()]; + for (int _j = 0; _j < boolLength(); ++_j) {_oBool[_j] = bool(_j);} + _o.setBool(_oBool); + } + public static int pack(FlatBufferBuilder builder, Framed16BooleanTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + _frames = createFramesVector(builder, _o.getFrames()); + } + int _bool = 0; + if (_o.getBool() != null) { + _bool = createBoolVector(builder, _o.getBool()); + } + return createFramed16BooleanTrack( + builder, + _frames, + _bool); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrackT.java new file mode 100644 index 00000000..ff58cdec --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16BooleanTrackT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed16BooleanTrackT { + private int[] frames; + private boolean[] bool; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public boolean[] getBool() { return bool; } + + public void setBool(boolean[] bool) { this.bool = bool; } + + + public Framed16BooleanTrackT() { + this.frames = null; + this.bool = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrack.java new file mode 100644 index 00000000..4c54d70c --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrack.java @@ -0,0 +1,103 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed16ByteTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed16ByteTrack getRootAsFramed16ByteTrack(ByteBuffer _bb) { return getRootAsFramed16ByteTrack(_bb, new Framed16ByteTrack()); } + public static Framed16ByteTrack getRootAsFramed16ByteTrack(ByteBuffer _bb, Framed16ByteTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed16ByteTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.getShort(__vector(o) + j * 2) & 0xFFFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ShortVector framesVector() { return framesVector(new ShortVector()); } + public ShortVector framesVector(ShortVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 2); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 2); } + public int byte_(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int byte_Length() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteVector byteVector() { return byteVector(new ByteVector()); } + public ByteVector byteVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer byte_AsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer byte_InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createFramed16ByteTrack(FlatBufferBuilder builder, + int framesOffset, + int byte_Offset) { + builder.startTable(2); + Framed16ByteTrack.addByte(builder, byte_Offset); + Framed16ByteTrack.addFrames(builder, framesOffset); + return Framed16ByteTrack.endFramed16ByteTrack(builder); + } + + public static void startFramed16ByteTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(2, data.length, 2); for (int i = data.length - 1; i >= 0; i--) builder.addShort((short) data[i]); return builder.endVector(); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(2, numElems, 2); } + public static void addByte(FlatBufferBuilder builder, int byte_Offset) { builder.addOffset(1, byte_Offset, 0); } + public static int createByteVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createByteVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startByteVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endFramed16ByteTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed16ByteTrack get(int j) { return get(new Framed16ByteTrack(), j); } + public Framed16ByteTrack get(Framed16ByteTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed16ByteTrackT unpack() { + Framed16ByteTrackT _o = new Framed16ByteTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed16ByteTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + int[] _oByte = new int[byte_Length()]; + for (int _j = 0; _j < byte_Length(); ++_j) {_oByte[_j] = byte_(_j);} + _o.setByte(_oByte); + } + public static int pack(FlatBufferBuilder builder, Framed16ByteTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + _frames = createFramesVector(builder, _o.getFrames()); + } + int _byte_ = 0; + if (_o.getByte() != null) { + byte[] __byte_ = new byte[_o.getByte().length]; + int _j = 0; + for (int _e : _o.getByte()) { __byte_[_j] = (byte) _e; _j++;} + _byte_ = createByteVector(builder, __byte_); + } + return createFramed16ByteTrack( + builder, + _frames, + _byte_); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrackT.java new file mode 100644 index 00000000..0e8822ce --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16ByteTrackT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed16ByteTrackT { + private int[] frames; + private int[] byte_; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public int[] getByte() { return byte_; } + + public void setByte(int[] byte_) { this.byte_ = byte_; } + + + public Framed16ByteTrackT() { + this.frames = null; + this.byte_ = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrack.java new file mode 100644 index 00000000..cbbe56e8 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrack.java @@ -0,0 +1,99 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed16FloatTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed16FloatTrack getRootAsFramed16FloatTrack(ByteBuffer _bb) { return getRootAsFramed16FloatTrack(_bb, new Framed16FloatTrack()); } + public static Framed16FloatTrack getRootAsFramed16FloatTrack(ByteBuffer _bb, Framed16FloatTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed16FloatTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.getShort(__vector(o) + j * 2) & 0xFFFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ShortVector framesVector() { return framesVector(new ShortVector()); } + public ShortVector framesVector(ShortVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 2); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 2); } + public float float_(int j) { int o = __offset(6); return o != 0 ? bb.getFloat(__vector(o) + j * 4) : 0; } + public int float_Length() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public FloatVector floatVector() { return floatVector(new FloatVector()); } + public FloatVector floatVector(FloatVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer float_AsByteBuffer() { return __vector_as_bytebuffer(6, 4); } + public ByteBuffer float_InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 4); } + + public static int createFramed16FloatTrack(FlatBufferBuilder builder, + int framesOffset, + int float_Offset) { + builder.startTable(2); + Framed16FloatTrack.addFloat(builder, float_Offset); + Framed16FloatTrack.addFrames(builder, framesOffset); + return Framed16FloatTrack.endFramed16FloatTrack(builder); + } + + public static void startFramed16FloatTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(2, data.length, 2); for (int i = data.length - 1; i >= 0; i--) builder.addShort((short) data[i]); return builder.endVector(); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(2, numElems, 2); } + public static void addFloat(FlatBufferBuilder builder, int float_Offset) { builder.addOffset(1, float_Offset, 0); } + public static int createFloatVector(FlatBufferBuilder builder, float[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addFloat(data[i]); return builder.endVector(); } + public static void startFloatVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFramed16FloatTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed16FloatTrack get(int j) { return get(new Framed16FloatTrack(), j); } + public Framed16FloatTrack get(Framed16FloatTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed16FloatTrackT unpack() { + Framed16FloatTrackT _o = new Framed16FloatTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed16FloatTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + float[] _oFloat = new float[float_Length()]; + for (int _j = 0; _j < float_Length(); ++_j) {_oFloat[_j] = float_(_j);} + _o.setFloat(_oFloat); + } + public static int pack(FlatBufferBuilder builder, Framed16FloatTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + _frames = createFramesVector(builder, _o.getFrames()); + } + int _float_ = 0; + if (_o.getFloat() != null) { + _float_ = createFloatVector(builder, _o.getFloat()); + } + return createFramed16FloatTrack( + builder, + _frames, + _float_); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrackT.java new file mode 100644 index 00000000..b9741dff --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16FloatTrackT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed16FloatTrackT { + private int[] frames; + private float[] float_; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public float[] getFloat() { return float_; } + + public void setFloat(float[] float_) { this.float_ = float_; } + + + public Framed16FloatTrackT() { + this.frames = null; + this.float_ = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrack.java new file mode 100644 index 00000000..39e9a879 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrack.java @@ -0,0 +1,101 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed16RotationTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed16RotationTrack getRootAsFramed16RotationTrack(ByteBuffer _bb) { return getRootAsFramed16RotationTrack(_bb, new Framed16RotationTrack()); } + public static Framed16RotationTrack getRootAsFramed16RotationTrack(ByteBuffer _bb, Framed16RotationTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed16RotationTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.getShort(__vector(o) + j * 2) & 0xFFFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ShortVector framesVector() { return framesVector(new ShortVector()); } + public ShortVector framesVector(ShortVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 2); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 2); } + public sVec3 co(int j) { return co(new sVec3(), j); } + public sVec3 co(sVec3 obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o) + j * 6, bb) : null; } + public int coLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public sVec3.Vector coVector() { return coVector(new sVec3.Vector()); } + public sVec3.Vector coVector(sVec3.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 6, bb) : null; } + + public static int createFramed16RotationTrack(FlatBufferBuilder builder, + int framesOffset, + int coOffset) { + builder.startTable(2); + Framed16RotationTrack.addCo(builder, coOffset); + Framed16RotationTrack.addFrames(builder, framesOffset); + return Framed16RotationTrack.endFramed16RotationTrack(builder); + } + + public static void startFramed16RotationTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(2, data.length, 2); for (int i = data.length - 1; i >= 0; i--) builder.addShort((short) data[i]); return builder.endVector(); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(2, numElems, 2); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addOffset(1, coOffset, 0); } + public static void startCoVector(FlatBufferBuilder builder, int numElems) { builder.startVector(6, numElems, 2); } + public static int endFramed16RotationTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed16RotationTrack get(int j) { return get(new Framed16RotationTrack(), j); } + public Framed16RotationTrack get(Framed16RotationTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed16RotationTrackT unpack() { + Framed16RotationTrackT _o = new Framed16RotationTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed16RotationTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + sVec3T[] _oCo = new sVec3T[coLength()]; + for (int _j = 0; _j < coLength(); ++_j) {_oCo[_j] = (co(_j) != null ? co(_j).unpack() : null);} + _o.setCo(_oCo); + } + public static int pack(FlatBufferBuilder builder, Framed16RotationTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + _frames = createFramesVector(builder, _o.getFrames()); + } + int _co = 0; + sVec3T[] _oCo = _o.getCo(); + if (_oCo != null) { + int _unused_offset = 0; + startCoVector(builder, _oCo.length); + for (int _j = _oCo.length - 1; _j >=0; _j--) { _unused_offset = sVec3.pack(builder, _oCo[_j]);} + _co = builder.endVector(); + } + return createFramed16RotationTrack( + builder, + _frames, + _co); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrackT.java new file mode 100644 index 00000000..edb93530 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16RotationTrackT.java @@ -0,0 +1,37 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import gg.generations.rarecandy.renderer.animation.TranmUtil; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Quaternionf; + +public class Framed16RotationTrackT implements RotationTrackUnion.TrackProcesser { + private int[] frames; + private sVec3T[] co; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public sVec3T[] getCo() { return co; } + + public void setCo(sVec3T[] co) { this.co = co; } + + + public Framed16RotationTrackT() { + this.frames = null; + this.co = null; + } + + @Override + public void process(TransformStorage rotationKeys) { + var frames = getFrames(); + for (int i = 0; i < getFrames().length; i++) { + var vec = getCo()[i]; + var frame = frames[i]; + rotationKeys.add(frames[i], TranmUtil.packedToQuat((short) vec.getX(), (short) vec.getY(), (short) vec.getZ())); + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrack.java new file mode 100644 index 00000000..efeb53e7 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrack.java @@ -0,0 +1,101 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed16VectorTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed16VectorTrack getRootAsFramed16VectorTrack(ByteBuffer _bb) { return getRootAsFramed16VectorTrack(_bb, new Framed16VectorTrack()); } + public static Framed16VectorTrack getRootAsFramed16VectorTrack(ByteBuffer _bb, Framed16VectorTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed16VectorTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.getShort(__vector(o) + j * 2) & 0xFFFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ShortVector framesVector() { return framesVector(new ShortVector()); } + public ShortVector framesVector(ShortVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 2); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 2); } + public Vec3 co(int j) { return co(new Vec3(), j); } + public Vec3 co(Vec3 obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o) + j * 12, bb) : null; } + public int coLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public Vec3.Vector coVector() { return coVector(new Vec3.Vector()); } + public Vec3.Vector coVector(Vec3.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 12, bb) : null; } + + public static int createFramed16VectorTrack(FlatBufferBuilder builder, + int framesOffset, + int coOffset) { + builder.startTable(2); + Framed16VectorTrack.addCo(builder, coOffset); + Framed16VectorTrack.addFrames(builder, framesOffset); + return Framed16VectorTrack.endFramed16VectorTrack(builder); + } + + public static void startFramed16VectorTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(2, data.length, 2); for (int i = data.length - 1; i >= 0; i--) builder.addShort((short) data[i]); return builder.endVector(); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(2, numElems, 2); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addOffset(1, coOffset, 0); } + public static void startCoVector(FlatBufferBuilder builder, int numElems) { builder.startVector(12, numElems, 4); } + public static int endFramed16VectorTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed16VectorTrack get(int j) { return get(new Framed16VectorTrack(), j); } + public Framed16VectorTrack get(Framed16VectorTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed16VectorTrackT unpack() { + Framed16VectorTrackT _o = new Framed16VectorTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed16VectorTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + Vec3T[] _oCo = new Vec3T[coLength()]; + for (int _j = 0; _j < coLength(); ++_j) {_oCo[_j] = (co(_j) != null ? co(_j).unpack() : null);} + _o.setCo(_oCo); + } + public static int pack(FlatBufferBuilder builder, Framed16VectorTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + _frames = createFramesVector(builder, _o.getFrames()); + } + int _co = 0; + Vec3T[] _oCo = _o.getCo(); + if (_oCo != null) { + int _unused_offset = 0; + startCoVector(builder, _oCo.length); + for (int _j = _oCo.length - 1; _j >=0; _j--) { _unused_offset = Vec3.pack(builder, _oCo[_j]);} + _co = builder.endVector(); + } + return createFramed16VectorTrack( + builder, + _frames, + _co); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrackT.java new file mode 100644 index 00000000..07e504d8 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed16VectorTrackT.java @@ -0,0 +1,51 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Vector3f; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed16VectorTrackT implements RotationTrackUnion.TrackProcesser { + private int[] frames; + private Vec3T[] co; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public Vec3T[] getCo() { return co; } + + public void setCo(Vec3T[] co) { this.co = co; } + + + public Framed16VectorTrackT() { + this.frames = null; + this.co = null; + } + + @Override + public void process(TransformStorage keys) { + for (int i = 0; i < getCo().length; i++) { + var vec = getCo()[i]; + keys.add(getFrames()[i], new Vector3f(vec.getX(), vec.getY(), vec.getZ())); + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrack.java new file mode 100644 index 00000000..eba46f1e --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrack.java @@ -0,0 +1,103 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed8BooleanTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed8BooleanTrack getRootAsFramed8BooleanTrack(ByteBuffer _bb) { return getRootAsFramed8BooleanTrack(_bb, new Framed8BooleanTrack()); } + public static Framed8BooleanTrack getRootAsFramed8BooleanTrack(ByteBuffer _bb, Framed8BooleanTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed8BooleanTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector framesVector() { return framesVector(new ByteVector()); } + public ByteVector framesVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public boolean bool(int j) { int o = __offset(6); return o != 0 ? 0!=bb.get(__vector(o) + j * 1) : false; } + public int boolLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public BooleanVector boolVector() { return boolVector(new BooleanVector()); } + public BooleanVector boolVector(BooleanVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer boolAsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer boolInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createFramed8BooleanTrack(FlatBufferBuilder builder, + int framesOffset, + int boolOffset) { + builder.startTable(2); + Framed8BooleanTrack.addBool(builder, boolOffset); + Framed8BooleanTrack.addFrames(builder, framesOffset); + return Framed8BooleanTrack.endFramed8BooleanTrack(builder); + } + + public static void startFramed8BooleanTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createFramesVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addBool(FlatBufferBuilder builder, int boolOffset) { builder.addOffset(1, boolOffset, 0); } + public static int createBoolVector(FlatBufferBuilder builder, boolean[] data) { builder.startVector(1, data.length, 1); for (int i = data.length - 1; i >= 0; i--) builder.addBoolean(data[i]); return builder.endVector(); } + public static void startBoolVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endFramed8BooleanTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed8BooleanTrack get(int j) { return get(new Framed8BooleanTrack(), j); } + public Framed8BooleanTrack get(Framed8BooleanTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed8BooleanTrackT unpack() { + Framed8BooleanTrackT _o = new Framed8BooleanTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed8BooleanTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + boolean[] _oBool = new boolean[boolLength()]; + for (int _j = 0; _j < boolLength(); ++_j) {_oBool[_j] = bool(_j);} + _o.setBool(_oBool); + } + public static int pack(FlatBufferBuilder builder, Framed8BooleanTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + byte[] __frames = new byte[_o.getFrames().length]; + int _j = 0; + for (int _e : _o.getFrames()) { __frames[_j] = (byte) _e; _j++;} + _frames = createFramesVector(builder, __frames); + } + int _bool = 0; + if (_o.getBool() != null) { + _bool = createBoolVector(builder, _o.getBool()); + } + return createFramed8BooleanTrack( + builder, + _frames, + _bool); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrackT.java new file mode 100644 index 00000000..612cb7ce --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8BooleanTrackT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed8BooleanTrackT { + private int[] frames; + private boolean[] bool; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public boolean[] getBool() { return bool; } + + public void setBool(boolean[] bool) { this.bool = bool; } + + + public Framed8BooleanTrackT() { + this.frames = null; + this.bool = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrack.java new file mode 100644 index 00000000..850464f8 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrack.java @@ -0,0 +1,107 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed8ByteTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed8ByteTrack getRootAsFramed8ByteTrack(ByteBuffer _bb) { return getRootAsFramed8ByteTrack(_bb, new Framed8ByteTrack()); } + public static Framed8ByteTrack getRootAsFramed8ByteTrack(ByteBuffer _bb, Framed8ByteTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed8ByteTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector framesVector() { return framesVector(new ByteVector()); } + public ByteVector framesVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public int byte_(int j) { int o = __offset(6); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int byte_Length() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public ByteVector byteVector() { return byteVector(new ByteVector()); } + public ByteVector byteVector(ByteVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer byte_AsByteBuffer() { return __vector_as_bytebuffer(6, 1); } + public ByteBuffer byte_InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 1); } + + public static int createFramed8ByteTrack(FlatBufferBuilder builder, + int framesOffset, + int byte_Offset) { + builder.startTable(2); + Framed8ByteTrack.addByte(builder, byte_Offset); + Framed8ByteTrack.addFrames(builder, framesOffset); + return Framed8ByteTrack.endFramed8ByteTrack(builder); + } + + public static void startFramed8ByteTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createFramesVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addByte(FlatBufferBuilder builder, int byte_Offset) { builder.addOffset(1, byte_Offset, 0); } + public static int createByteVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createByteVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startByteVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static int endFramed8ByteTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed8ByteTrack get(int j) { return get(new Framed8ByteTrack(), j); } + public Framed8ByteTrack get(Framed8ByteTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed8ByteTrackT unpack() { + Framed8ByteTrackT _o = new Framed8ByteTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed8ByteTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + int[] _oByte = new int[byte_Length()]; + for (int _j = 0; _j < byte_Length(); ++_j) {_oByte[_j] = byte_(_j);} + _o.setByte(_oByte); + } + public static int pack(FlatBufferBuilder builder, Framed8ByteTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + byte[] __frames = new byte[_o.getFrames().length]; + int _j = 0; + for (int _e : _o.getFrames()) { __frames[_j] = (byte) _e; _j++;} + _frames = createFramesVector(builder, __frames); + } + int _byte_ = 0; + if (_o.getByte() != null) { + byte[] __byte_ = new byte[_o.getByte().length]; + int _j = 0; + for (int _e : _o.getByte()) { __byte_[_j] = (byte) _e; _j++;} + _byte_ = createByteVector(builder, __byte_); + } + return createFramed8ByteTrack( + builder, + _frames, + _byte_); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrackT.java new file mode 100644 index 00000000..bf4c8273 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8ByteTrackT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed8ByteTrackT { + private int[] frames; + private int[] byte_; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public int[] getByte() { return byte_; } + + public void setByte(int[] byte_) { this.byte_ = byte_; } + + + public Framed8ByteTrackT() { + this.frames = null; + this.byte_ = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrack.java new file mode 100644 index 00000000..396adf9b --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrack.java @@ -0,0 +1,103 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed8FloatTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed8FloatTrack getRootAsFramed8FloatTrack(ByteBuffer _bb) { return getRootAsFramed8FloatTrack(_bb, new Framed8FloatTrack()); } + public static Framed8FloatTrack getRootAsFramed8FloatTrack(ByteBuffer _bb, Framed8FloatTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed8FloatTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector framesVector() { return framesVector(new ByteVector()); } + public ByteVector framesVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public float float_(int j) { int o = __offset(6); return o != 0 ? bb.getFloat(__vector(o) + j * 4) : 0; } + public int float_Length() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public FloatVector floatVector() { return floatVector(new FloatVector()); } + public FloatVector floatVector(FloatVector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer float_AsByteBuffer() { return __vector_as_bytebuffer(6, 4); } + public ByteBuffer float_InByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 6, 4); } + + public static int createFramed8FloatTrack(FlatBufferBuilder builder, + int framesOffset, + int float_Offset) { + builder.startTable(2); + Framed8FloatTrack.addFloat(builder, float_Offset); + Framed8FloatTrack.addFrames(builder, framesOffset); + return Framed8FloatTrack.endFramed8FloatTrack(builder); + } + + public static void startFramed8FloatTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createFramesVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addFloat(FlatBufferBuilder builder, int float_Offset) { builder.addOffset(1, float_Offset, 0); } + public static int createFloatVector(FlatBufferBuilder builder, float[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addFloat(data[i]); return builder.endVector(); } + public static void startFloatVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endFramed8FloatTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed8FloatTrack get(int j) { return get(new Framed8FloatTrack(), j); } + public Framed8FloatTrack get(Framed8FloatTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed8FloatTrackT unpack() { + Framed8FloatTrackT _o = new Framed8FloatTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed8FloatTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + float[] _oFloat = new float[float_Length()]; + for (int _j = 0; _j < float_Length(); ++_j) {_oFloat[_j] = float_(_j);} + _o.setFloat(_oFloat); + } + public static int pack(FlatBufferBuilder builder, Framed8FloatTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + byte[] __frames = new byte[_o.getFrames().length]; + int _j = 0; + for (int _e : _o.getFrames()) { __frames[_j] = (byte) _e; _j++;} + _frames = createFramesVector(builder, __frames); + } + int _float_ = 0; + if (_o.getFloat() != null) { + _float_ = createFloatVector(builder, _o.getFloat()); + } + return createFramed8FloatTrack( + builder, + _frames, + _float_); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrackT.java new file mode 100644 index 00000000..e9f68ef8 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8FloatTrackT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed8FloatTrackT { + private int[] frames; + private float[] float_; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public float[] getFloat() { return float_; } + + public void setFloat(float[] float_) { this.float_ = float_; } + + + public Framed8FloatTrackT() { + this.frames = null; + this.float_ = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrack.java new file mode 100644 index 00000000..95ff4820 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrack.java @@ -0,0 +1,105 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed8RotationTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed8RotationTrack getRootAsFramed8RotationTrack(ByteBuffer _bb) { return getRootAsFramed8RotationTrack(_bb, new Framed8RotationTrack()); } + public static Framed8RotationTrack getRootAsFramed8RotationTrack(ByteBuffer _bb, Framed8RotationTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed8RotationTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector framesVector() { return framesVector(new ByteVector()); } + public ByteVector framesVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public sVec3 co(int j) { return co(new sVec3(), j); } + public sVec3 co(sVec3 obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o) + j * 6, bb) : null; } + public int coLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public sVec3.Vector coVector() { return coVector(new sVec3.Vector()); } + public sVec3.Vector coVector(sVec3.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 6, bb) : null; } + + public static int createFramed8RotationTrack(FlatBufferBuilder builder, + int framesOffset, + int coOffset) { + builder.startTable(2); + Framed8RotationTrack.addCo(builder, coOffset); + Framed8RotationTrack.addFrames(builder, framesOffset); + return Framed8RotationTrack.endFramed8RotationTrack(builder); + } + + public static void startFramed8RotationTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createFramesVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addOffset(1, coOffset, 0); } + public static void startCoVector(FlatBufferBuilder builder, int numElems) { builder.startVector(6, numElems, 2); } + public static int endFramed8RotationTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed8RotationTrack get(int j) { return get(new Framed8RotationTrack(), j); } + public Framed8RotationTrack get(Framed8RotationTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed8RotationTrackT unpack() { + Framed8RotationTrackT _o = new Framed8RotationTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed8RotationTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + sVec3T[] _oCo = new sVec3T[coLength()]; + for (int _j = 0; _j < coLength(); ++_j) {_oCo[_j] = (co(_j) != null ? co(_j).unpack() : null);} + _o.setCo(_oCo); + } + public static int pack(FlatBufferBuilder builder, Framed8RotationTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + byte[] __frames = new byte[_o.getFrames().length]; + int _j = 0; + for (int _e : _o.getFrames()) { __frames[_j] = (byte) _e; _j++;} + _frames = createFramesVector(builder, __frames); + } + int _co = 0; + sVec3T[] _oCo = _o.getCo(); + if (_oCo != null) { + int _unused_offset = 0; + startCoVector(builder, _oCo.length); + for (int _j = _oCo.length - 1; _j >=0; _j--) { _unused_offset = sVec3.pack(builder, _oCo[_j]);} + _co = builder.endVector(); + } + return createFramed8RotationTrack( + builder, + _frames, + _co); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrackT.java new file mode 100644 index 00000000..61955043 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8RotationTrackT.java @@ -0,0 +1,36 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import gg.generations.rarecandy.renderer.animation.TranmUtil; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Quaternionf; + +public class Framed8RotationTrackT implements RotationTrackUnion.TrackProcesser { + private int[] frames; + private sVec3T[] co; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public sVec3T[] getCo() { return co; } + + public void setCo(sVec3T[] co) { this.co = co; } + + + public Framed8RotationTrackT() { + this.frames = null; + this.co = null; + } + + @Override + public void process(TransformStorage rotationKeys) { + var frames = getFrames(); + for (int i = 0; i < getFrames().length; i++) { + var vec = getCo()[i]; + rotationKeys.add(frames[i], TranmUtil.packedToQuat((short) vec.getX(), (short) vec.getY(), (short) vec.getZ())); + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrack.java new file mode 100644 index 00000000..f82a1c3b --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrack.java @@ -0,0 +1,105 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Framed8VectorTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Framed8VectorTrack getRootAsFramed8VectorTrack(ByteBuffer _bb) { return getRootAsFramed8VectorTrack(_bb, new Framed8VectorTrack()); } + public static Framed8VectorTrack getRootAsFramed8VectorTrack(ByteBuffer _bb, Framed8VectorTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Framed8VectorTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int frames(int j) { int o = __offset(4); return o != 0 ? bb.get(__vector(o) + j * 1) & 0xFF : 0; } + public int framesLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public ByteVector framesVector() { return framesVector(new ByteVector()); } + public ByteVector framesVector(ByteVector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), bb) : null; } + public ByteBuffer framesAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer framesInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public Vec3 co(int j) { return co(new Vec3(), j); } + public Vec3 co(Vec3 obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o) + j * 12, bb) : null; } + public int coLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public Vec3.Vector coVector() { return coVector(new Vec3.Vector()); } + public Vec3.Vector coVector(Vec3.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 12, bb) : null; } + + public static int createFramed8VectorTrack(FlatBufferBuilder builder, + int framesOffset, + int coOffset) { + builder.startTable(2); + Framed8VectorTrack.addCo(builder, coOffset); + Framed8VectorTrack.addFrames(builder, framesOffset); + return Framed8VectorTrack.endFramed8VectorTrack(builder); + } + + public static void startFramed8VectorTrack(FlatBufferBuilder builder) { builder.startTable(2); } + public static void addFrames(FlatBufferBuilder builder, int framesOffset) { builder.addOffset(0, framesOffset, 0); } + public static int createFramesVector(FlatBufferBuilder builder, byte[] data) { return builder.createByteVector(data); } + public static int createFramesVector(FlatBufferBuilder builder, ByteBuffer data) { return builder.createByteVector(data); } + public static void startFramesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(1, numElems, 1); } + public static void addCo(FlatBufferBuilder builder, int coOffset) { builder.addOffset(1, coOffset, 0); } + public static void startCoVector(FlatBufferBuilder builder, int numElems) { builder.startVector(12, numElems, 4); } + public static int endFramed8VectorTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Framed8VectorTrack get(int j) { return get(new Framed8VectorTrack(), j); } + public Framed8VectorTrack get(Framed8VectorTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public Framed8VectorTrackT unpack() { + Framed8VectorTrackT _o = new Framed8VectorTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(Framed8VectorTrackT _o) { + int[] _oFrames = new int[framesLength()]; + for (int _j = 0; _j < framesLength(); ++_j) {_oFrames[_j] = frames(_j);} + _o.setFrames(_oFrames); + Vec3T[] _oCo = new Vec3T[coLength()]; + for (int _j = 0; _j < coLength(); ++_j) {_oCo[_j] = (co(_j) != null ? co(_j).unpack() : null);} + _o.setCo(_oCo); + } + public static int pack(FlatBufferBuilder builder, Framed8VectorTrackT _o) { + if (_o == null) return 0; + int _frames = 0; + if (_o.getFrames() != null) { + byte[] __frames = new byte[_o.getFrames().length]; + int _j = 0; + for (int _e : _o.getFrames()) { __frames[_j] = (byte) _e; _j++;} + _frames = createFramesVector(builder, __frames); + } + int _co = 0; + Vec3T[] _oCo = _o.getCo(); + if (_oCo != null) { + int _unused_offset = 0; + startCoVector(builder, _oCo.length); + for (int _j = _oCo.length - 1; _j >=0; _j--) { _unused_offset = Vec3.pack(builder, _oCo[_j]);} + _co = builder.endVector(); + } + return createFramed8VectorTrack( + builder, + _frames, + _co); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrackT.java new file mode 100644 index 00000000..482e4a05 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Framed8VectorTrackT.java @@ -0,0 +1,51 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Vector3f; + +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Framed8VectorTrackT implements RotationTrackUnion.TrackProcesser { + private int[] frames; + private Vec3T[] co; + + public int[] getFrames() { return frames; } + + public void setFrames(int[] frames) { this.frames = frames; } + + public Vec3T[] getCo() { return co; } + + public void setCo(Vec3T[] co) { this.co = co; } + + + public Framed8VectorTrackT() { + this.frames = null; + this.co = null; + } + + @Override + public void process(TransformStorage keys) { + for (int i = 0; i < getCo().length; i++) { + var vec = getCo()[i]; + keys.add(getFrames()[i], new Vector3f(vec.getX(), vec.getY(), vec.getZ())); + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Info.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Info.java new file mode 100644 index 00000000..524ab3b8 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Info.java @@ -0,0 +1,82 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Info extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static Info getRootAsInfo(ByteBuffer _bb) { return getRootAsInfo(_bb, new Info()); } + public static Info getRootAsInfo(ByteBuffer _bb, Info obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Info __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long doesLoop() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public long keyFrames() { int o = __offset(6); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + public long frameRate() { int o = __offset(8); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + + public static int createInfo(FlatBufferBuilder builder, + long doesLoop, + long keyFrames, + long frameRate) { + builder.startTable(3); + Info.addFrameRate(builder, frameRate); + Info.addKeyFrames(builder, keyFrames); + Info.addDoesLoop(builder, doesLoop); + return Info.endInfo(builder); + } + + public static void startInfo(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addDoesLoop(FlatBufferBuilder builder, long doesLoop) { builder.addInt(0, (int) doesLoop, (int) 0L); } + public static void addKeyFrames(FlatBufferBuilder builder, long keyFrames) { builder.addInt(1, (int) keyFrames, (int) 0L); } + public static void addFrameRate(FlatBufferBuilder builder, long frameRate) { builder.addInt(2, (int) frameRate, (int) 0L); } + public static int endInfo(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Info get(int j) { return get(new Info(), j); } + public Info get(Info obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public InfoT unpack() { + InfoT _o = new InfoT(); + unpackTo(_o); + return _o; + } + public void unpackTo(InfoT _o) { + long _oDoesLoop = doesLoop(); + _o.setDoesLoop(_oDoesLoop); + long _oKeyFrames = keyFrames(); + _o.setKeyFrames(_oKeyFrames); + long _oFrameRate = frameRate(); + _o.setFrameRate(_oFrameRate); + } + public static int pack(FlatBufferBuilder builder, InfoT _o) { + if (_o == null) return 0; + return createInfo( + builder, + _o.getDoesLoop(), + _o.getKeyFrames(), + _o.getFrameRate()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/InfoT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/InfoT.java new file mode 100644 index 00000000..a453869f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/InfoT.java @@ -0,0 +1,46 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class InfoT { + private long doesLoop; + private long keyFrames; + private long frameRate; + + public long getDoesLoop() { return doesLoop; } + + public void setDoesLoop(long doesLoop) { this.doesLoop = doesLoop; } + + public long getKeyFrames() { return keyFrames; } + + public void setKeyFrames(long keyFrames) { this.keyFrames = keyFrames; } + + public long getFrameRate() { return frameRate; } + + public void setFrameRate(long frameRate) { this.frameRate = frameRate; } + + + public InfoT() { + this.doesLoop = 0L; + this.keyFrames = 0L; + this.frameRate = 0L; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrack.java new file mode 100644 index 00000000..28fea083 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrack.java @@ -0,0 +1,68 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class IntDataTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static IntDataTrack getRootAsIntDataTrack(ByteBuffer _bb) { return getRootAsIntDataTrack(_bb, new IntDataTrack()); } + public static IntDataTrack getRootAsIntDataTrack(ByteBuffer _bb, IntDataTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public IntDataTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public long value() { int o = __offset(4); return o != 0 ? (long)bb.getInt(o + bb_pos) & 0xFFFFFFFFL : 0L; } + + public static int createIntDataTrack(FlatBufferBuilder builder, + long value) { + builder.startTable(1); + IntDataTrack.addValue(builder, value); + return IntDataTrack.endIntDataTrack(builder); + } + + public static void startIntDataTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addValue(FlatBufferBuilder builder, long value) { builder.addInt(0, (int) value, (int) 0L); } + public static int endIntDataTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public IntDataTrack get(int j) { return get(new IntDataTrack(), j); } + public IntDataTrack get(IntDataTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public IntDataTrackT unpack() { + IntDataTrackT _o = new IntDataTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(IntDataTrackT _o) { + long _oValue = value(); + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, IntDataTrackT _o) { + if (_o == null) return 0; + return createIntDataTrack( + builder, + _o.getValue()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrackT.java new file mode 100644 index 00000000..29ea23a8 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/IntDataTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class IntDataTrackT { + private long value; + + public long getValue() { return value; } + + public void setValue(long value) { this.value = value; } + + + public IntDataTrackT() { + this.value = 0L; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimation.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimation.java new file mode 100644 index 00000000..9dfd1b5e --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimation.java @@ -0,0 +1,82 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class MaterialAnimation extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static MaterialAnimation getRootAsMaterialAnimation(ByteBuffer _bb) { return getRootAsMaterialAnimation(_bb, new MaterialAnimation()); } + public static MaterialAnimation getRootAsMaterialAnimation(ByteBuffer _bb, MaterialAnimation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public MaterialAnimation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public MaterialTrack tracks(int j) { return tracks(new MaterialTrack(), j); } + public MaterialTrack tracks(MaterialTrack obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int tracksLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public MaterialTrack.Vector tracksVector() { return tracksVector(new MaterialTrack.Vector()); } + public MaterialTrack.Vector tracksVector(MaterialTrack.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createMaterialAnimation(FlatBufferBuilder builder, + int tracksOffset) { + builder.startTable(1); + MaterialAnimation.addTracks(builder, tracksOffset); + return MaterialAnimation.endMaterialAnimation(builder); + } + + public static void startMaterialAnimation(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTracks(FlatBufferBuilder builder, int tracksOffset) { builder.addOffset(0, tracksOffset, 0); } + public static int createTracksVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startTracksVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endMaterialAnimation(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public MaterialAnimation get(int j) { return get(new MaterialAnimation(), j); } + public MaterialAnimation get(MaterialAnimation obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public MaterialAnimationT unpack() { + MaterialAnimationT _o = new MaterialAnimationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(MaterialAnimationT _o) { + MaterialTrackT[] _oTracks = new MaterialTrackT[tracksLength()]; + for (int _j = 0; _j < tracksLength(); ++_j) {_oTracks[_j] = (tracks(_j) != null ? tracks(_j).unpack() : null);} + _o.setTracks(_oTracks); + } + public static int pack(FlatBufferBuilder builder, MaterialAnimationT _o) { + if (_o == null) return 0; + int _tracks = 0; + if (_o.getTracks() != null) { + int[] __tracks = new int[_o.getTracks().length]; + int _j = 0; + for (MaterialTrackT _e : _o.getTracks()) { __tracks[_j] = MaterialTrack.pack(builder, _e); _j++;} + _tracks = createTracksVector(builder, __tracks); + } + return createMaterialAnimation( + builder, + _tracks); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimationT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimationT.java new file mode 100644 index 00000000..3ba4f9ba --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialAnimationT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class MaterialAnimationT { + private MaterialTrackT[] tracks; + + public MaterialTrackT[] getTracks() { return tracks; } + + public void setTracks(MaterialTrackT[] tracks) { this.tracks = tracks; } + + + public MaterialAnimationT() { + this.tracks = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrack.java new file mode 100644 index 00000000..d230554e --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrack.java @@ -0,0 +1,134 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class MaterialTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static MaterialTrack getRootAsMaterialTrack(ByteBuffer _bb) { return getRootAsMaterialTrack(_bb, new MaterialTrack()); } + public static MaterialTrack getRootAsMaterialTrack(ByteBuffer _bb, MaterialTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public MaterialTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public FlagEntry flags(int j) { return flags(new FlagEntry(), j); } + public FlagEntry flags(FlagEntry obj, int j) { int o = __offset(6); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int flagsLength() { int o = __offset(6); return o != 0 ? __vector_len(o) : 0; } + public FlagEntry.Vector flagsVector() { return flagsVector(new FlagEntry.Vector()); } + public FlagEntry.Vector flagsVector(FlagEntry.Vector obj) { int o = __offset(6); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public ShaderEntry values(int j) { return values(new ShaderEntry(), j); } + public ShaderEntry values(ShaderEntry obj, int j) { int o = __offset(8); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int valuesLength() { int o = __offset(8); return o != 0 ? __vector_len(o) : 0; } + public ShaderEntry.Vector valuesVector() { return valuesVector(new ShaderEntry.Vector()); } + public ShaderEntry.Vector valuesVector(ShaderEntry.Vector obj) { int o = __offset(8); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + public ColorEntry vectors(int j) { return vectors(new ColorEntry(), j); } + public ColorEntry vectors(ColorEntry obj, int j) { int o = __offset(10); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int vectorsLength() { int o = __offset(10); return o != 0 ? __vector_len(o) : 0; } + public ColorEntry.Vector vectorsVector() { return vectorsVector(new ColorEntry.Vector()); } + public ColorEntry.Vector vectorsVector(ColorEntry.Vector obj) { int o = __offset(10); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createMaterialTrack(FlatBufferBuilder builder, + int nameOffset, + int flagsOffset, + int valuesOffset, + int vectorsOffset) { + builder.startTable(4); + MaterialTrack.addVectors(builder, vectorsOffset); + MaterialTrack.addValues(builder, valuesOffset); + MaterialTrack.addFlags(builder, flagsOffset); + MaterialTrack.addName(builder, nameOffset); + return MaterialTrack.endMaterialTrack(builder); + } + + public static void startMaterialTrack(FlatBufferBuilder builder) { builder.startTable(4); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addFlags(FlatBufferBuilder builder, int flagsOffset) { builder.addOffset(1, flagsOffset, 0); } + public static int createFlagsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startFlagsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addValues(FlatBufferBuilder builder, int valuesOffset) { builder.addOffset(2, valuesOffset, 0); } + public static int createValuesVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startValuesVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static void addVectors(FlatBufferBuilder builder, int vectorsOffset) { builder.addOffset(3, vectorsOffset, 0); } + public static int createVectorsVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startVectorsVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endMaterialTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public MaterialTrack get(int j) { return get(new MaterialTrack(), j); } + public MaterialTrack get(MaterialTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public MaterialTrackT unpack() { + MaterialTrackT _o = new MaterialTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(MaterialTrackT _o) { + String _oName = name(); + _o.setName(_oName); + FlagEntryT[] _oFlags = new FlagEntryT[flagsLength()]; + for (int _j = 0; _j < flagsLength(); ++_j) {_oFlags[_j] = (flags(_j) != null ? flags(_j).unpack() : null);} + _o.setFlags(_oFlags); + ShaderEntryT[] _oValues = new ShaderEntryT[valuesLength()]; + for (int _j = 0; _j < valuesLength(); ++_j) {_oValues[_j] = (values(_j) != null ? values(_j).unpack() : null);} + _o.setValues(_oValues); + ColorEntryT[] _oVectors = new ColorEntryT[vectorsLength()]; + for (int _j = 0; _j < vectorsLength(); ++_j) {_oVectors[_j] = (vectors(_j) != null ? vectors(_j).unpack() : null);} + _o.setVectors(_oVectors); + } + public static int pack(FlatBufferBuilder builder, MaterialTrackT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + int _flags = 0; + if (_o.getFlags() != null) { + int[] __flags = new int[_o.getFlags().length]; + int _j = 0; + for (FlagEntryT _e : _o.getFlags()) { __flags[_j] = FlagEntry.pack(builder, _e); _j++;} + _flags = createFlagsVector(builder, __flags); + } + int _values = 0; + if (_o.getValues() != null) { + int[] __values = new int[_o.getValues().length]; + int _j = 0; + for (ShaderEntryT _e : _o.getValues()) { __values[_j] = ShaderEntry.pack(builder, _e); _j++;} + _values = createValuesVector(builder, __values); + } + int _vectors = 0; + if (_o.getVectors() != null) { + int[] __vectors = new int[_o.getVectors().length]; + int _j = 0; + for (ColorEntryT _e : _o.getVectors()) { __vectors[_j] = ColorEntry.pack(builder, _e); _j++;} + _vectors = createVectorsVector(builder, __vectors); + } + return createMaterialTrack( + builder, + _name, + _flags, + _values, + _vectors); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrackT.java new file mode 100644 index 00000000..14f28c5a --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/MaterialTrackT.java @@ -0,0 +1,52 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class MaterialTrackT { + private String name; + private FlagEntryT[] flags; + private ShaderEntryT[] values; + private ColorEntryT[] vectors; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public FlagEntryT[] getFlags() { return flags; } + + public void setFlags(FlagEntryT[] flags) { this.flags = flags; } + + public ShaderEntryT[] getValues() { return values; } + + public void setValues(ShaderEntryT[] values) { this.values = values; } + + public ColorEntryT[] getVectors() { return vectors; } + + public void setVectors(ColorEntryT[] vectors) { this.vectors = vectors; } + + + public MaterialTrackT() { + this.name = null; + this.flags = null; + this.values = null; + this.vectors = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrack.java new file mode 100644 index 00000000..ccac8124 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrack.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +@SuppressWarnings("unused") +public final class RotationTrack { + private RotationTrack() { } + public static final byte NONE = 0; + public static final byte FixedRotationTrack = 1; + public static final byte DynamicRotationTrack = 2; + public static final byte Framed16RotationTrack = 3; + public static final byte Framed8RotationTrack = 4; + + public static final String[] names = { "NONE", "FixedRotationTrack", "DynamicRotationTrack", "Framed16RotationTrack", "Framed8RotationTrack", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrackUnion.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrackUnion.java new file mode 100644 index 00000000..362f04d6 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/RotationTrackUnion.java @@ -0,0 +1,45 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.FlatBufferBuilder; +import gg.generations.rarecandy.renderer.animation.TransformStorage; +import org.joml.Quaternionf; + +public class RotationTrackUnion { + private byte type; + private TrackProcesser value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public TrackProcesser getValue() { return value; } + + public void setValue(TrackProcesser value) { this.value = value; } + + public RotationTrackUnion() { + this.type = RotationTrack.NONE; + this.value = null; + } + + public FixedRotationTrackT asFixedRotationTrack() { return (FixedRotationTrackT) value; } + public DynamicRotationTrackT asDynamicRotationTrack() { return (DynamicRotationTrackT) value; } + public Framed16RotationTrackT asFramed16RotationTrack() { return (Framed16RotationTrackT) value; } + public Framed8RotationTrackT asFramed8RotationTrack() { return (Framed8RotationTrackT) value; } + + public static int pack(FlatBufferBuilder builder, RotationTrackUnion _o) { + switch (_o.type) { + case RotationTrack.FixedRotationTrack: return FixedRotationTrack.pack(builder, _o.asFixedRotationTrack()); + case RotationTrack.DynamicRotationTrack: return DynamicRotationTrack.pack(builder, _o.asDynamicRotationTrack()); + case RotationTrack.Framed16RotationTrack: return Framed16RotationTrack.pack(builder, _o.asFramed16RotationTrack()); + case RotationTrack.Framed8RotationTrack: return Framed8RotationTrack.pack(builder, _o.asFramed8RotationTrack()); + default: return 0; + } + } + + public interface TrackProcesser { + void process(TransformStorage rotationKeys); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntry.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntry.java new file mode 100644 index 00000000..93945f4f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntry.java @@ -0,0 +1,107 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class ShaderEntry extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static ShaderEntry getRootAsShaderEntry(ByteBuffer _bb) { return getRootAsShaderEntry(_bb, new ShaderEntry()); } + public static ShaderEntry getRootAsShaderEntry(ByteBuffer _bb, ShaderEntry obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public ShaderEntry __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public byte valueType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table value(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createShaderEntry(FlatBufferBuilder builder, + int nameOffset, + byte valueType, + int valueOffset) { + builder.startTable(3); + ShaderEntry.addValue(builder, valueOffset); + ShaderEntry.addName(builder, nameOffset); + ShaderEntry.addValueType(builder, valueType); + return ShaderEntry.endShaderEntry(builder); + } + + public static void startShaderEntry(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addValueType(FlatBufferBuilder builder, byte valueType) { builder.addByte(1, valueType, 0); } + public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(2, valueOffset, 0); } + public static int endShaderEntry(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public ShaderEntry get(int j) { return get(new ShaderEntry(), j); } + public ShaderEntry get(ShaderEntry obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public ShaderEntryT unpack() { + ShaderEntryT _o = new ShaderEntryT(); + unpackTo(_o); + return _o; + } + public void unpackTo(ShaderEntryT _o) { + String _oName = name(); + _o.setName(_oName); + FloatTrackUnion _oValue = new FloatTrackUnion(); + byte _oValueType = valueType(); + _oValue.setType(_oValueType); + Table _oValueValue; + switch (_oValueType) { + case FloatTrack.FixedFloatTrack: + _oValueValue = value(new FixedFloatTrack()); + _oValue.setValue(_oValueValue != null ? ((FixedFloatTrack) _oValueValue).unpack() : null); + break; + case FloatTrack.DynamicFloatTrack: + _oValueValue = value(new DynamicFloatTrack()); + _oValue.setValue(_oValueValue != null ? ((DynamicFloatTrack) _oValueValue).unpack() : null); + break; + case FloatTrack.Framed16FloatTrack: + _oValueValue = value(new Framed16FloatTrack()); + _oValue.setValue(_oValueValue != null ? ((Framed16FloatTrack) _oValueValue).unpack() : null); + break; + case FloatTrack.Framed8FloatTrack: + _oValueValue = value(new Framed8FloatTrack()); + _oValue.setValue(_oValueValue != null ? ((Framed8FloatTrack) _oValueValue).unpack() : null); + break; + default: break; + } + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, ShaderEntryT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + byte _valueType = _o.getValue() == null ? FloatTrack.NONE : _o.getValue().getType(); + int _value = _o.getValue() == null ? 0 : FloatTrackUnion.pack(builder, _o.getValue()); + return createShaderEntry( + builder, + _name, + _valueType, + _value); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntryT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntryT.java new file mode 100644 index 00000000..f68d453f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/ShaderEntryT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class ShaderEntryT { + private String name; + private FloatTrackUnion value; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public FloatTrackUnion getValue() { return value; } + + public void setValue(FloatTrackUnion value) { this.value = value; } + + + public ShaderEntryT() { + this.name = null; + this.value = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimation.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimation.java new file mode 100644 index 00000000..da8dbab0 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimation.java @@ -0,0 +1,82 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class SkinAnimation extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static SkinAnimation getRootAsSkinAnimation(ByteBuffer _bb) { return getRootAsSkinAnimation(_bb, new SkinAnimation()); } + public static SkinAnimation getRootAsSkinAnimation(ByteBuffer _bb, SkinAnimation obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public SkinAnimation __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public SkinTrack tracks(int j) { return tracks(new SkinTrack(), j); } + public SkinTrack tracks(SkinTrack obj, int j) { int o = __offset(4); return o != 0 ? obj.__assign(__indirect(__vector(o) + j * 4), bb) : null; } + public int tracksLength() { int o = __offset(4); return o != 0 ? __vector_len(o) : 0; } + public SkinTrack.Vector tracksVector() { return tracksVector(new SkinTrack.Vector()); } + public SkinTrack.Vector tracksVector(SkinTrack.Vector obj) { int o = __offset(4); return o != 0 ? obj.__assign(__vector(o), 4, bb) : null; } + + public static int createSkinAnimation(FlatBufferBuilder builder, + int tracksOffset) { + builder.startTable(1); + SkinAnimation.addTracks(builder, tracksOffset); + return SkinAnimation.endSkinAnimation(builder); + } + + public static void startSkinAnimation(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addTracks(FlatBufferBuilder builder, int tracksOffset) { builder.addOffset(0, tracksOffset, 0); } + public static int createTracksVector(FlatBufferBuilder builder, int[] data) { builder.startVector(4, data.length, 4); for (int i = data.length - 1; i >= 0; i--) builder.addOffset(data[i]); return builder.endVector(); } + public static void startTracksVector(FlatBufferBuilder builder, int numElems) { builder.startVector(4, numElems, 4); } + public static int endSkinAnimation(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public SkinAnimation get(int j) { return get(new SkinAnimation(), j); } + public SkinAnimation get(SkinAnimation obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SkinAnimationT unpack() { + SkinAnimationT _o = new SkinAnimationT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SkinAnimationT _o) { + SkinTrackT[] _oTracks = new SkinTrackT[tracksLength()]; + for (int _j = 0; _j < tracksLength(); ++_j) {_oTracks[_j] = (tracks(_j) != null ? tracks(_j).unpack() : null);} + _o.setTracks(_oTracks); + } + public static int pack(FlatBufferBuilder builder, SkinAnimationT _o) { + if (_o == null) return 0; + int _tracks = 0; + if (_o.getTracks() != null) { + int[] __tracks = new int[_o.getTracks().length]; + int _j = 0; + for (SkinTrackT _e : _o.getTracks()) { __tracks[_j] = SkinTrack.pack(builder, _e); _j++;} + _tracks = createTracksVector(builder, __tracks); + } + return createSkinAnimation( + builder, + _tracks); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimationT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimationT.java new file mode 100644 index 00000000..2785f0df --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinAnimationT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class SkinAnimationT { + private SkinTrackT[] tracks; + + public SkinTrackT[] getTracks() { return tracks; } + + public void setTracks(SkinTrackT[] tracks) { this.tracks = tracks; } + + + public SkinAnimationT() { + this.tracks = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrack.java new file mode 100644 index 00000000..2e645a29 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrack.java @@ -0,0 +1,107 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class SkinTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static SkinTrack getRootAsSkinTrack(ByteBuffer _bb) { return getRootAsSkinTrack(_bb, new SkinTrack()); } + public static SkinTrack getRootAsSkinTrack(ByteBuffer _bb, SkinTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public SkinTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String name() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer nameAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer nameInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + public byte valuesType() { int o = __offset(6); return o != 0 ? bb.get(o + bb_pos) : 0; } + public Table values(Table obj) { int o = __offset(8); return o != 0 ? __union(obj, o + bb_pos) : null; } + + public static int createSkinTrack(FlatBufferBuilder builder, + int nameOffset, + byte valuesType, + int valuesOffset) { + builder.startTable(3); + SkinTrack.addValues(builder, valuesOffset); + SkinTrack.addName(builder, nameOffset); + SkinTrack.addValuesType(builder, valuesType); + return SkinTrack.endSkinTrack(builder); + } + + public static void startSkinTrack(FlatBufferBuilder builder) { builder.startTable(3); } + public static void addName(FlatBufferBuilder builder, int nameOffset) { builder.addOffset(0, nameOffset, 0); } + public static void addValuesType(FlatBufferBuilder builder, byte valuesType) { builder.addByte(1, valuesType, 0); } + public static void addValues(FlatBufferBuilder builder, int valuesOffset) { builder.addOffset(2, valuesOffset, 0); } + public static int endSkinTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public SkinTrack get(int j) { return get(new SkinTrack(), j); } + public SkinTrack get(SkinTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public SkinTrackT unpack() { + SkinTrackT _o = new SkinTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(SkinTrackT _o) { + String _oName = name(); + _o.setName(_oName); + ByteTrackUnion _oValues = new ByteTrackUnion(); + byte _oValuesType = valuesType(); + _oValues.setType(_oValuesType); + Table _oValuesValue; + switch (_oValuesType) { + case ByteTrack.FixedByteTrack: + _oValuesValue = values(new FixedByteTrack()); + _oValues.setValue(_oValuesValue != null ? ((FixedByteTrack) _oValuesValue).unpack() : null); + break; + case ByteTrack.DynamicByteTrack: + _oValuesValue = values(new DynamicByteTrack()); + _oValues.setValue(_oValuesValue != null ? ((DynamicByteTrack) _oValuesValue).unpack() : null); + break; + case ByteTrack.Framed16ByteTrack: + _oValuesValue = values(new Framed16ByteTrack()); + _oValues.setValue(_oValuesValue != null ? ((Framed16ByteTrack) _oValuesValue).unpack() : null); + break; + case ByteTrack.Framed8ByteTrack: + _oValuesValue = values(new Framed8ByteTrack()); + _oValues.setValue(_oValuesValue != null ? ((Framed8ByteTrack) _oValuesValue).unpack() : null); + break; + default: break; + } + _o.setValues(_oValues); + } + public static int pack(FlatBufferBuilder builder, SkinTrackT _o) { + if (_o == null) return 0; + int _name = _o.getName() == null ? 0 : builder.createString(_o.getName()); + byte _valuesType = _o.getValues() == null ? ByteTrack.NONE : _o.getValues().getType(); + int _values = _o.getValues() == null ? 0 : ByteTrackUnion.pack(builder, _o.getValues()); + return createSkinTrack( + builder, + _name, + _valuesType, + _values); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrackT.java new file mode 100644 index 00000000..c3e9ea46 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/SkinTrackT.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class SkinTrackT { + private String name; + private ByteTrackUnion values; + + public String getName() { return name; } + + public void setName(String name) { this.name = name; } + + public ByteTrackUnion getValues() { return values; } + + public void setValues(ByteTrackUnion values) { this.values = values; } + + + public SkinTrackT() { + this.name = null; + this.values = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrack.java new file mode 100644 index 00000000..bd0d2695 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrack.java @@ -0,0 +1,71 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class StringDataTrack extends Table { + public static void ValidateVersion() { Constants.FLATBUFFERS_23_5_26(); } + public static StringDataTrack getRootAsStringDataTrack(ByteBuffer _bb) { return getRootAsStringDataTrack(_bb, new StringDataTrack()); } + public static StringDataTrack getRootAsStringDataTrack(ByteBuffer _bb, StringDataTrack obj) { _bb.order(ByteOrder.LITTLE_ENDIAN); return (obj.__assign(_bb.getInt(_bb.position()) + _bb.position(), _bb)); } + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public StringDataTrack __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public String value() { int o = __offset(4); return o != 0 ? __string(o + bb_pos) : null; } + public ByteBuffer valueAsByteBuffer() { return __vector_as_bytebuffer(4, 1); } + public ByteBuffer valueInByteBuffer(ByteBuffer _bb) { return __vector_in_bytebuffer(_bb, 4, 1); } + + public static int createStringDataTrack(FlatBufferBuilder builder, + int valueOffset) { + builder.startTable(1); + StringDataTrack.addValue(builder, valueOffset); + return StringDataTrack.endStringDataTrack(builder); + } + + public static void startStringDataTrack(FlatBufferBuilder builder) { builder.startTable(1); } + public static void addValue(FlatBufferBuilder builder, int valueOffset) { builder.addOffset(0, valueOffset, 0); } + public static int endStringDataTrack(FlatBufferBuilder builder) { + int o = builder.endTable(); + return o; + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public StringDataTrack get(int j) { return get(new StringDataTrack(), j); } + public StringDataTrack get(StringDataTrack obj, int j) { return obj.__assign(__indirect(__element(j), bb), bb); } + } + public StringDataTrackT unpack() { + StringDataTrackT _o = new StringDataTrackT(); + unpackTo(_o); + return _o; + } + public void unpackTo(StringDataTrackT _o) { + String _oValue = value(); + _o.setValue(_oValue); + } + public static int pack(FlatBufferBuilder builder, StringDataTrackT _o) { + if (_o == null) return 0; + int _value = _o.getValue() == null ? 0 : builder.createString(_o.getValue()); + return createStringDataTrack( + builder, + _value); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrackT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrackT.java new file mode 100644 index 00000000..01148e3a --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/StringDataTrackT.java @@ -0,0 +1,34 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class StringDataTrackT { + private String value; + + public String getValue() { return value; } + + public void setValue(String value) { this.value = value; } + + + public StringDataTrackT() { + this.value = null; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Transform.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Transform.java new file mode 100644 index 00000000..85886ae2 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Transform.java @@ -0,0 +1,94 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Transform extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Transform __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public Vec3 scale() { return scale(new Vec3()); } + public Vec3 scale(Vec3 obj) { return obj.__assign(bb_pos + 0, bb); } + public Vec4 rotate() { return rotate(new Vec4()); } + public Vec4 rotate(Vec4 obj) { return obj.__assign(bb_pos + 12, bb); } + public Vec3 translate() { return translate(new Vec3()); } + public Vec3 translate(Vec3 obj) { return obj.__assign(bb_pos + 28, bb); } + + public static int createTransform(FlatBufferBuilder builder, float scale_x, float scale_y, float scale_z, float rotate_x, float rotate_y, float rotate_z, float rotate_w, float translate_x, float translate_y, float translate_z) { + builder.prep(4, 40); + builder.prep(4, 12); + builder.putFloat(translate_z); + builder.putFloat(translate_y); + builder.putFloat(translate_x); + builder.prep(4, 16); + builder.putFloat(rotate_w); + builder.putFloat(rotate_z); + builder.putFloat(rotate_y); + builder.putFloat(rotate_x); + builder.prep(4, 12); + builder.putFloat(scale_z); + builder.putFloat(scale_y); + builder.putFloat(scale_x); + return builder.offset(); + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Transform get(int j) { return get(new Transform(), j); } + public Transform get(Transform obj, int j) { return obj.__assign(__element(j), bb); } + } + public TransformT unpack() { + TransformT _o = new TransformT(); + unpackTo(_o); + return _o; + } + public void unpackTo(TransformT _o) { + scale().unpackTo(_o.getScale()); + rotate().unpackTo(_o.getRotate()); + translate().unpackTo(_o.getTranslate()); + } + public static int pack(FlatBufferBuilder builder, TransformT _o) { + if (_o == null) return 0; + float _scale_x = _o.getScale().getX(); + float _scale_y = _o.getScale().getY(); + float _scale_z = _o.getScale().getZ(); + float _rotate_x = _o.getRotate().getX(); + float _rotate_y = _o.getRotate().getY(); + float _rotate_z = _o.getRotate().getZ(); + float _rotate_w = _o.getRotate().getW(); + float _translate_x = _o.getTranslate().getX(); + float _translate_y = _o.getTranslate().getY(); + float _translate_z = _o.getTranslate().getZ(); + return createTransform( + builder, + _scale_x, + _scale_y, + _scale_z, + _rotate_x, + _rotate_y, + _rotate_z, + _rotate_w, + _translate_x, + _translate_y, + _translate_z); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/TransformT.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/TransformT.java new file mode 100644 index 00000000..b8f64637 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/TransformT.java @@ -0,0 +1,46 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class TransformT { + private Vec3T scale; + private Vec4T rotate; + private Vec3T translate; + + public Vec3T getScale() { return scale; } + + public void setScale(Vec3T scale) { this.scale = scale; } + + public Vec4T getRotate() { return rotate; } + + public void setRotate(Vec4T rotate) { this.rotate = rotate; } + + public Vec3T getTranslate() { return translate; } + + public void setTranslate(Vec3T translate) { this.translate = translate; } + + + public TransformT() { + this.scale = new Vec3T(); + this.rotate = new Vec4T(); + this.translate = new Vec3T(); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2.java new file mode 100644 index 00000000..c8a666e9 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2.java @@ -0,0 +1,62 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Vec2 extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Vec2 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float u() { return bb.getFloat(bb_pos + 0); } + public float v() { return bb.getFloat(bb_pos + 4); } + + public static int createVec2(FlatBufferBuilder builder, float u, float v) { + builder.prep(4, 8); + builder.putFloat(v); + builder.putFloat(u); + return builder.offset(); + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Vec2 get(int j) { return get(new Vec2(), j); } + public Vec2 get(Vec2 obj, int j) { return obj.__assign(__element(j), bb); } + } + public Vec2T unpack() { + Vec2T _o = new Vec2T(); + unpackTo(_o); + return _o; + } + public void unpackTo(Vec2T _o) { + float _oU = u(); + _o.setU(_oU); + float _oV = v(); + _o.setV(_oV); + } + public static int pack(FlatBufferBuilder builder, Vec2T _o) { + if (_o == null) return 0; + return createVec2( + builder, + _o.getU(), + _o.getV()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2T.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2T.java new file mode 100644 index 00000000..00325b6a --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec2T.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Vec2T { + private float u; + private float v; + + public float getU() { return u; } + + public void setU(float u) { this.u = u; } + + public float getV() { return v; } + + public void setV(float v) { this.v = v; } + + + public Vec2T() { + this.u = 0.0f; + this.v = 0.0f; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3.java new file mode 100644 index 00000000..bd9a4b5f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3.java @@ -0,0 +1,67 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Vec3 extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Vec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float x() { return bb.getFloat(bb_pos + 0); } + public float y() { return bb.getFloat(bb_pos + 4); } + public float z() { return bb.getFloat(bb_pos + 8); } + + public static int createVec3(FlatBufferBuilder builder, float x, float y, float z) { + builder.prep(4, 12); + builder.putFloat(z); + builder.putFloat(y); + builder.putFloat(x); + return builder.offset(); + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Vec3 get(int j) { return get(new Vec3(), j); } + public Vec3 get(Vec3 obj, int j) { return obj.__assign(__element(j), bb); } + } + public Vec3T unpack() { + Vec3T _o = new Vec3T(); + unpackTo(_o); + return _o; + } + public void unpackTo(Vec3T _o) { + float _oX = x(); + _o.setX(_oX); + float _oY = y(); + _o.setY(_oY); + float _oZ = z(); + _o.setZ(_oZ); + } + public static int pack(FlatBufferBuilder builder, Vec3T _o) { + if (_o == null) return 0; + return createVec3( + builder, + _o.getX(), + _o.getY(), + _o.getZ()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3T.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3T.java new file mode 100644 index 00000000..27008bf5 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec3T.java @@ -0,0 +1,46 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Vec3T { + private float x; + private float y; + private float z; + + public float getX() { return x; } + + public void setX(float x) { this.x = x; } + + public float getY() { return y; } + + public void setY(float y) { this.y = y; } + + public float getZ() { return z; } + + public void setZ(float z) { this.z = z; } + + + public Vec3T() { + this.x = 0.0f; + this.y = 0.0f; + this.z = 0.0f; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4.java new file mode 100644 index 00000000..39281d00 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4.java @@ -0,0 +1,72 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class Vec4 extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public Vec4 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public float x() { return bb.getFloat(bb_pos + 0); } + public float y() { return bb.getFloat(bb_pos + 4); } + public float z() { return bb.getFloat(bb_pos + 8); } + public float w() { return bb.getFloat(bb_pos + 12); } + + public static int createVec4(FlatBufferBuilder builder, float x, float y, float z, float w) { + builder.prep(4, 16); + builder.putFloat(w); + builder.putFloat(z); + builder.putFloat(y); + builder.putFloat(x); + return builder.offset(); + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public Vec4 get(int j) { return get(new Vec4(), j); } + public Vec4 get(Vec4 obj, int j) { return obj.__assign(__element(j), bb); } + } + public Vec4T unpack() { + Vec4T _o = new Vec4T(); + unpackTo(_o); + return _o; + } + public void unpackTo(Vec4T _o) { + float _oX = x(); + _o.setX(_oX); + float _oY = y(); + _o.setY(_oY); + float _oZ = z(); + _o.setZ(_oZ); + float _oW = w(); + _o.setW(_oW); + } + public static int pack(FlatBufferBuilder builder, Vec4T _o) { + if (_o == null) return 0; + return createVec4( + builder, + _o.getX(), + _o.getY(), + _o.getZ(), + _o.getW()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4T.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4T.java new file mode 100644 index 00000000..9461b664 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/Vec4T.java @@ -0,0 +1,52 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class Vec4T { + private float x; + private float y; + private float z; + private float w; + + public float getX() { return x; } + + public void setX(float x) { this.x = x; } + + public float getY() { return y; } + + public void setY(float y) { this.y = y; } + + public float getZ() { return z; } + + public void setZ(float z) { this.z = z; } + + public float getW() { return w; } + + public void setW(float w) { this.w = w; } + + + public Vec4T() { + this.x = 0.0f; + this.y = 0.0f; + this.z = 0.0f; + this.w = 0.0f; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrack.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrack.java new file mode 100644 index 00000000..23f0b0c7 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrack.java @@ -0,0 +1,18 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +@SuppressWarnings("unused") +public final class VectorTrack { + private VectorTrack() { } + public static final byte NONE = 0; + public static final byte FixedVectorTrack = 1; + public static final byte DynamicVectorTrack = 2; + public static final byte Framed16VectorTrack = 3; + public static final byte Framed8VectorTrack = 4; + + public static final String[] names = { "NONE", "FixedVectorTrack", "DynamicVectorTrack", "Framed16VectorTrack", "Framed8VectorTrack", }; + + public static String name(int e) { return names[e]; } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrackUnion.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrackUnion.java new file mode 100644 index 00000000..34239113 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/VectorTrackUnion.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.FlatBufferBuilder; +import org.joml.Vector3f; + +public class VectorTrackUnion { + private byte type; + private RotationTrackUnion.TrackProcesser value; + + public byte getType() { return type; } + + public void setType(byte type) { this.type = type; } + + public RotationTrackUnion.TrackProcesser getValue() { return value; } + + public void setValue(RotationTrackUnion.TrackProcesser value) { this.value = value; } + + public VectorTrackUnion() { + this.type = VectorTrack.NONE; + this.value = null; + } + + public FixedVectorTrackT asFixedVectorTrack() { return (FixedVectorTrackT) value; } + public DynamicVectorTrackT asDynamicVectorTrack() { return (DynamicVectorTrackT) value; } + public Framed16VectorTrackT asFramed16VectorTrack() { return (Framed16VectorTrackT) value; } + public Framed8VectorTrackT asFramed8VectorTrack() { return (Framed8VectorTrackT) value; } + + public static int pack(FlatBufferBuilder builder, VectorTrackUnion _o) { + switch (_o.type) { + case VectorTrack.FixedVectorTrack: return FixedVectorTrack.pack(builder, _o.asFixedVectorTrack()); + case VectorTrack.DynamicVectorTrack: return DynamicVectorTrack.pack(builder, _o.asDynamicVectorTrack()); + case VectorTrack.Framed16VectorTrack: return Framed16VectorTrack.pack(builder, _o.asFramed16VectorTrack()); + case VectorTrack.Framed8VectorTrack: return Framed8VectorTrack.pack(builder, _o.asFramed8VectorTrack()); + default: return 0; + } + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2.java new file mode 100644 index 00000000..7e98ba61 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2.java @@ -0,0 +1,62 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class sVec2 extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public sVec2 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public short u() { return bb.getShort(bb_pos + 0); } + public short v() { return bb.getShort(bb_pos + 2); } + + public static int createsVec2(FlatBufferBuilder builder, short u, short v) { + builder.prep(2, 4); + builder.putShort(v); + builder.putShort(u); + return builder.offset(); + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public sVec2 get(int j) { return get(new sVec2(), j); } + public sVec2 get(sVec2 obj, int j) { return obj.__assign(__element(j), bb); } + } + public sVec2T unpack() { + sVec2T _o = new sVec2T(); + unpackTo(_o); + return _o; + } + public void unpackTo(sVec2T _o) { + short _oU = u(); + _o.setU(_oU); + short _oV = v(); + _o.setV(_oV); + } + public static int pack(FlatBufferBuilder builder, sVec2T _o) { + if (_o == null) return 0; + return createsVec2( + builder, + _o.getU(), + _o.getV()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2T.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2T.java new file mode 100644 index 00000000..689d8230 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec2T.java @@ -0,0 +1,40 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class sVec2T { + private short u; + private short v; + + public short getU() { return u; } + + public void setU(short u) { this.u = u; } + + public short getV() { return v; } + + public void setV(short v) { this.v = v; } + + + public sVec2T() { + this.u = 0; + this.v = 0; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3.java new file mode 100644 index 00000000..612e0605 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3.java @@ -0,0 +1,67 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +@SuppressWarnings("unused") +public final class sVec3 extends Struct { + public void __init(int _i, ByteBuffer _bb) { __reset(_i, _bb); } + public sVec3 __assign(int _i, ByteBuffer _bb) { __init(_i, _bb); return this; } + + public int x() { return bb.getShort(bb_pos + 0) & 0xFFFF; } + public int y() { return bb.getShort(bb_pos + 2) & 0xFFFF; } + public int z() { return bb.getShort(bb_pos + 4) & 0xFFFF; } + + public static int createsVec3(FlatBufferBuilder builder, int x, int y, int z) { + builder.prep(2, 6); + builder.putShort((short) z); + builder.putShort((short) y); + builder.putShort((short) x); + return builder.offset(); + } + + public static final class Vector extends BaseVector { + public Vector __assign(int _vector, int _element_size, ByteBuffer _bb) { __reset(_vector, _element_size, _bb); return this; } + + public sVec3 get(int j) { return get(new sVec3(), j); } + public sVec3 get(sVec3 obj, int j) { return obj.__assign(__element(j), bb); } + } + public sVec3T unpack() { + sVec3T _o = new sVec3T(); + unpackTo(_o); + return _o; + } + public void unpackTo(sVec3T _o) { + int _oX = x(); + _o.setX(_oX); + int _oY = y(); + _o.setY(_oY); + int _oZ = z(); + _o.setZ(_oZ); + } + public static int pack(FlatBufferBuilder builder, sVec3T _o) { + if (_o == null) return 0; + return createsVec3( + builder, + _o.getX(), + _o.getY(), + _o.getZ()); + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3T.java b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3T.java new file mode 100644 index 00000000..ab894c1f --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/GFLib/Anim/sVec3T.java @@ -0,0 +1,46 @@ +// automatically generated by the FlatBuffers compiler, do not modify + +package gg.generations.rarecandy.pokeutils.GFLib.Anim; + +import com.google.flatbuffers.BaseVector; +import com.google.flatbuffers.BooleanVector; +import com.google.flatbuffers.ByteVector; +import com.google.flatbuffers.Constants; +import com.google.flatbuffers.DoubleVector; +import com.google.flatbuffers.FlatBufferBuilder; +import com.google.flatbuffers.FloatVector; +import com.google.flatbuffers.IntVector; +import com.google.flatbuffers.LongVector; +import com.google.flatbuffers.ShortVector; +import com.google.flatbuffers.StringVector; +import com.google.flatbuffers.Struct; +import com.google.flatbuffers.Table; +import com.google.flatbuffers.UnionVector; +import java.nio.ByteBuffer; +import java.nio.ByteOrder; + +public class sVec3T { + private int x; + private int y; + private int z; + + public int getX() { return x; } + + public void setX(int x) { this.x = x; } + + public int getY() { return y; } + + public void setY(int y) { this.y = y; } + + public int getZ() { return z; } + + public void setZ(int z) { this.z = z; } + + + public sVec3T() { + this.x = 0; + this.y = 0; + this.z = 0; + } +} + diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/MaterialReference.java b/src/library/java/gg/generations/rarecandy/pokeutils/MaterialReference.java index b9c05ac5..1ee4c306 100644 --- a/src/library/java/gg/generations/rarecandy/pokeutils/MaterialReference.java +++ b/src/library/java/gg/generations/rarecandy/pokeutils/MaterialReference.java @@ -29,6 +29,9 @@ public MaterialReference deserialize(JsonElement json, Type typeOfT, JsonDeseria var cull = jsonObject.has("cull") ? CullType.from(jsonObject.getAsJsonPrimitive("cull").getAsString()) : CullType.Forward; return new CullMaterialReference(texture, cull); } + case "unlit_cull" -> { + return new UnlitCullMaterialReference(texture); + } case "unlit" -> { return new UnlitMaterialReference(texture); } diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/UnlitCullMaterialReference.java b/src/library/java/gg/generations/rarecandy/pokeutils/UnlitCullMaterialReference.java new file mode 100644 index 00000000..dd2e19b6 --- /dev/null +++ b/src/library/java/gg/generations/rarecandy/pokeutils/UnlitCullMaterialReference.java @@ -0,0 +1,13 @@ +package gg.generations.rarecandy.pokeutils; + +public class UnlitCullMaterialReference extends UnlitMaterialReference { + + public UnlitCullMaterialReference(String texture) { + super(texture); + } + + @Override + public CullType cullType() { + return CullType.Back; + } +} diff --git a/src/library/java/gg/generations/rarecandy/pokeutils/UnlitMaterialReference.java b/src/library/java/gg/generations/rarecandy/pokeutils/UnlitMaterialReference.java index 70f3bda5..739febe0 100644 --- a/src/library/java/gg/generations/rarecandy/pokeutils/UnlitMaterialReference.java +++ b/src/library/java/gg/generations/rarecandy/pokeutils/UnlitMaterialReference.java @@ -1,12 +1,12 @@ package gg.generations.rarecandy.pokeutils; public class UnlitMaterialReference extends DiffuseMaterialReference { + public UnlitMaterialReference(String texture) { + super(texture); + } + @Override public String shader() { return "unlit"; } - - public UnlitMaterialReference(String texture) { - super(texture); - } } diff --git a/src/library/java/gg/generations/rarecandy/renderer/animation/Animation.java b/src/library/java/gg/generations/rarecandy/renderer/animation/Animation.java index 8a0d7c9a..b0efcdd1 100644 --- a/src/library/java/gg/generations/rarecandy/renderer/animation/Animation.java +++ b/src/library/java/gg/generations/rarecandy/renderer/animation/Animation.java @@ -3,6 +3,8 @@ import de.javagl.jgltf.model.AnimationModel; import de.javagl.jgltf.model.NodeModel; import dev.thecodewarrior.binarysmd.studiomdl.SkeletonBlock; +import gg.generations.rarecandy.pokeutils.GFLib.Anim.AnimationT; +import gg.generations.rarecandy.pokeutils.GFLib.Anim.RotationTrack; import gg.generations.rarecandy.pokeutils.ModelNode; import gg.generations.rarecandy.pokeutils.tranm.*; import org.joml.Matrix4f; @@ -35,7 +37,7 @@ public Animation(AnimationModel rawAnimation, Skeleton skeleton, int speed) { animationModifier.accept(this, "glb"); } - public Animation(String name, gg.generations.rarecandy.pokeutils.tranm.Animation rawAnimation, Skeleton skeleton) { + public Animation(String name, AnimationT rawAnimation, Skeleton skeleton) { this.name = name; this.ticksPerSecond = FPS_60 - 95; this.skeleton = skeleton; @@ -57,6 +59,28 @@ public Animation(String name, gg.generations.rarecandy.pokeutils.tranm.Animation animationModifier.accept(this, "gfb"); } + public Animation(String name, gg.generations.rarecandy.pokeutils.tranm.Animation rawAnimation, Skeleton skeleton) { + this.name = name; + this.ticksPerSecond = FPS_60 - 95; + this.skeleton = skeleton; + this.animationNodes = fillAnimationNodesTranm(rawAnimation); + this.animationDuration = findLastKeyTime(); + + + for (var animationNode : animationNodes) { + if (animationNode != null) { + if (animationNode.positionKeys.getAtTime((int) animationDuration - 10) == null) + animationNode.positionKeys.add(animationDuration, animationNode.positionKeys.get(0).value()); + if (animationNode.rotationKeys.getAtTime((int) animationDuration - 10) == null) + animationNode.rotationKeys.add(animationDuration, animationNode.rotationKeys.get(0).value()); + if (animationNode.scaleKeys.getAtTime((int) animationDuration - 10) == null) + animationNode.scaleKeys.add(animationDuration, animationNode.scaleKeys.get(0).value()); + } + } + + animationModifier.accept(this, "gfb"); + } + public Animation(String name, SkeletonBlock smdFile, Skeleton bones, int speed) { this.name = name; this.ticksPerSecond = speed; @@ -156,7 +180,35 @@ private AnimationNode[] fillAnimationNodesGlb(List chann return animationNodes; } - private AnimationNode[] fillAnimationNodesGfb(gg.generations.rarecandy.pokeutils.tranm.Animation rawAnimation) { + private AnimationNode[] fillAnimationNodesGfb(AnimationT rawAnimation) { + var animationNodes = new AnimationNode[skeleton.boneMap.size()]; // BoneGroup + + if (rawAnimation.getSkeleton() != null) { + int trueIndex = -1; + + for (int i = 0; i < rawAnimation.getSkeleton().getTracks().length; i++) { + var boneAnim = rawAnimation.getSkeleton().getTracks()[i]; + if (!skeleton.boneMap.containsKey(boneAnim.getName())) { + continue; + } + + trueIndex++; + + nodeIdMap.put(Objects.requireNonNull(boneAnim.getName()).replace(".trmdl", ""), trueIndex); + + var node = animationNodes[trueIndex] = new AnimationNode(); + + boneAnim.getRotate().getValue().process(node.rotationKeys); + boneAnim.getScale().getValue().process(node.scaleKeys); + boneAnim.getTranslate().getValue().process(node.positionKeys); + } + + } + return animationNodes; + + } + + private AnimationNode[] fillAnimationNodesTranm(gg.generations.rarecandy.pokeutils.tranm.Animation rawAnimation) { var animationNodes = new AnimationNode[skeleton.boneMap.size()]; // BoneGroup int trueIndex = -1; diff --git a/src/library/java/gg/generations/rarecandy/renderer/loading/ModelLoader.java b/src/library/java/gg/generations/rarecandy/renderer/loading/ModelLoader.java index a61c325c..e2b03e37 100644 --- a/src/library/java/gg/generations/rarecandy/renderer/loading/ModelLoader.java +++ b/src/library/java/gg/generations/rarecandy/renderer/loading/ModelLoader.java @@ -52,11 +52,11 @@ public ModelLoader() { this.modelLoadingPool = Executors.newFixedThreadPool(2); } - public static void create2(MultiRenderObject objects, GltfModel gltfModel, Map smdFileMap, Map gfbFileMap, Map images, ModelConfig config, List glCalls, Supplier supplier) { - create2(objects, gltfModel, smdFileMap, gfbFileMap, images, config, glCalls, supplier, Animation.GLB_SPEED); + public static void create2(MultiRenderObject objects, GltfModel gltfModel, Map smdFileMap, Map gfbFileMap, Map tranmFilesMap, Map images, ModelConfig config, List glCalls, Supplier supplier) { + create2(objects, gltfModel, smdFileMap, gfbFileMap, tranmFilesMap, images, config, glCalls, supplier, Animation.GLB_SPEED); } - public static void create2(MultiRenderObject objects, GltfModel gltfModel, Map smdFileMap, Map gfbFileMap, Map images, ModelConfig config, List glCalls, Supplier supplier, int animationSpeed) { + public static void create2(MultiRenderObject objects, GltfModel gltfModel, Map smdFileMap, Map gfbFileMap, Map tranmFilesMap, Map images, ModelConfig config, List glCalls, Supplier supplier, int animationSpeed) { checkForRootTransformation(objects, gltfModel); if (gltfModel.getSceneModels().size() > 1) throw new RuntimeException("Cannot handle more than one scene"); @@ -68,9 +68,10 @@ public static void create2(MultiRenderObject objects, skeleton = new Skeleton(gltfModel.getSkinModels().get(0)); animations = gltfModel.getAnimationModels().stream().map(animationModel -> new Animation(animationModel, skeleton, animationSpeed)).collect(Collectors.toMap(animation -> animation.name, animation -> animation)); - for (var entry : gfbFileMap.entrySet()) { + for (var entry : tranmFilesMap.entrySet()) { var name = entry.getKey(); var buffer = ByteBuffer.wrap(entry.getValue()); + var gfbAnim = gg.generations.rarecandy.pokeutils.tranm.Animation.getRootAsAnimation(buffer); if(gfbAnim.anim() == null) continue; @@ -78,6 +79,16 @@ public static void create2(MultiRenderObject objects, animations.put(name, new Animation(name, gfbAnim, new Skeleton(skeleton))); } + for (var entry : gfbFileMap.entrySet()) { + var name = entry.getKey(); + + var gfbAnim = gg.generations.rarecandy.pokeutils.GFLib.Anim.AnimationT.deserializeFromBinary(entry.getValue()); + + if(gfbAnim.getSkeleton() == null) continue; + + animations.put(name, new Animation(name, gfbAnim, new Skeleton(skeleton))); + } + for (var entry : smdFileMap.entrySet()) { var key = entry.getKey(); var value = entry.getValue(); @@ -499,8 +510,9 @@ private Runnable threadedCreateObject(MultiRenderObject var model = read(asset); var smdAnims = readSmdAnimations(asset); var gfbAnims = readGfbAnimations(asset); + var trAnims = readtrAnimations(asset); var images = readImages(asset); - var glCalls = objectCreator.getCalls(model, smdAnims, gfbAnims, images, config, obj); + var glCalls = objectCreator.getCalls(model, smdAnims, gfbAnims, trAnims, images, config, obj); ThreadSafety.runOnContextThread(() -> { glCalls.forEach(Runnable::run); obj.updateDimensions(); @@ -527,10 +539,17 @@ private Map readImages(PixelAsset asset) { private Map readGfbAnimations(PixelAsset asset) { return asset.files.entrySet().stream() - .filter(entry -> entry.getKey().endsWith(".pkx") || entry.getKey().endsWith(".gfbanm") || entry.getKey().endsWith(".tranm")) + .filter(entry -> entry.getKey().endsWith(".pkx") || entry.getKey().endsWith(".gfbanm")) .collect(Collectors.toMap(this::cleanAnimName, Map.Entry::getValue)); } + private Map readtrAnimations(PixelAsset asset) { + return asset.files.entrySet().stream() + .filter(entry -> entry.getKey().endsWith(".tranm")) + .collect(Collectors.toMap(this::cleanAnimName, Map.Entry::getValue)); + } + + public String cleanAnimName(Map.Entry entry) { var str = entry.getKey(); return cleanAnimName(str); @@ -549,7 +568,7 @@ private Map readSmdAnimations(PixelAsset pixelAsset) { for (var entry : files) { var smdFile = reader.read(new String(entry.getValue())); - map.put(entry.getKey(), smdFile); + map.put(cleanAnimName(entry.getKey()), smdFile); } return map; diff --git a/src/library/java/gg/generations/rarecandy/renderer/model/GlCallSupplier.java b/src/library/java/gg/generations/rarecandy/renderer/model/GlCallSupplier.java index 4320de5e..74c50d05 100644 --- a/src/library/java/gg/generations/rarecandy/renderer/model/GlCallSupplier.java +++ b/src/library/java/gg/generations/rarecandy/renderer/model/GlCallSupplier.java @@ -13,5 +13,5 @@ @FunctionalInterface public interface GlCallSupplier { - List getCalls(GltfModel model, Map smdFiles, Map gfbFiles, Map imageFiles, ModelConfig config, MultiRenderObject mro); + List getCalls(GltfModel model, Map smdFiles, Map gfbamnFiles, Map tranmFiles, Map imageFiles, ModelConfig config, MultiRenderObject mro); } diff --git a/src/library/resources/shaders/animated/animated.vs.glsl b/src/library/resources/shaders/animated/animated.vs.glsl index 1b7cdb9b..6dfddeee 100644 --- a/src/library/resources/shaders/animated/animated.vs.glsl +++ b/src/library/resources/shaders/animated/animated.vs.glsl @@ -1,4 +1,7 @@ -#version 450 +#version 150 core +#extension GL_ARB_explicit_uniform_location : enable +#extension GL_ARB_explicit_attrib_location : enable + #define MAX_BONES 220 layout(location = 0) in vec3 positions; @@ -15,7 +18,6 @@ out vec3 normal; uniform mat4 viewMatrix; uniform mat4 modelMatrix; uniform mat4 projectionMatrix; -uniform vec3 lightPosition; uniform mat4 boneTransforms[MAX_BONES]; @@ -37,6 +39,5 @@ void main() { texCoord0 = vec2(texcoords.x, texcoords.y); gl_Position = worldSpace * worldPosition; - toLightVector = lightPosition - vec3(worldPosition.x, -5.0, worldPosition.z); toCameraVector = (inverse(viewMatrix) * vec4(0.0, 0.0, 0.0, 1.0)).xyz - worldPosition.xyz; } \ No newline at end of file diff --git a/src/library/resources/shaders/animated/animated_pbr.fs.glsl b/src/library/resources/shaders/animated/animated_pbr.fs.glsl deleted file mode 100644 index 9937096e..00000000 --- a/src/library/resources/shaders/animated/animated_pbr.fs.glsl +++ /dev/null @@ -1,47 +0,0 @@ -#version 450 core -#define ambientLight 0.6f - -in vec2 texCoord0; -in vec3 normal; -in vec3 toLightVector; -in vec3 toCameraVector; - -out vec4 outColor; - -uniform sampler2D diffuse; - -uniform int intColor; -uniform float shineDamper; -uniform float reflectivity; -uniform float diffuseColorMix; - -vec3 intToColor() { - return vec3((intColor >> 16 & 255) / 255.0, (intColor >> 8 & 255) / 255.0, (intColor & 255) / 255.0); -} - -void main() { - vec4 color = texture2D(diffuse, texCoord0); - - vec3 lightColor = intToColor(); - vec3 pixelmonColor = mix(lightColor, vec3(1.0, 1.0, 1.0), diffuseColorMix); - vec3 unitNormal = normalize(normal); - vec3 unitLightVector = normalize(toLightVector); - vec3 lightDir = -unitLightVector; - vec3 unitToCameraVector = normalize(toCameraVector); - - // Diffuse Lighting - float rawDiffuse = dot(unitNormal, unitLightVector); - float diffuse = max(rawDiffuse, ambientLight); - vec3 coloredDiffuse = diffuse * pixelmonColor; - - // Specular Lighting - vec3 reflectedLightDir = reflect(lightDir, unitNormal); - float rawSpecularFactor = dot(reflectedLightDir, unitToCameraVector); - float specularFactor = max(rawSpecularFactor, 0.0f); - float dampedFactor = pow(specularFactor, shineDamper); - vec3 finalSpecular = dampedFactor * reflectivity * lightColor; - - if (color.a < 0.01) discard; - - outColor = vec4(coloredDiffuse, 1.0f) * color + vec4(finalSpecular, 1.0f); -} diff --git a/src/library/resources/shaders/animated/solid.fs.glsl b/src/library/resources/shaders/animated/solid.fs.glsl index a00e88c5..fc0be606 100644 --- a/src/library/resources/shaders/animated/solid.fs.glsl +++ b/src/library/resources/shaders/animated/solid.fs.glsl @@ -1,4 +1,5 @@ -#version 450 core +#version 150 core + #define ambientLight 0.6f in vec2 texCoord0; @@ -10,7 +11,7 @@ uniform sampler2D diffuse; uniform float lightLevel; void main() { - vec4 color = texture2D(diffuse, texCoord0); + vec4 color = texture(diffuse, texCoord0); if (color.a < 0.01) discard; diff --git a/src/library/resources/shaders/animated/transparent.fs.glsl b/src/library/resources/shaders/animated/transparent.fs.glsl index 3f020b56..fa4668c5 100644 --- a/src/library/resources/shaders/animated/transparent.fs.glsl +++ b/src/library/resources/shaders/animated/transparent.fs.glsl @@ -1,4 +1,5 @@ -#version 450 core +#version 150 core + #define ambientLight 0.6f in vec2 texCoord0; @@ -10,7 +11,7 @@ uniform sampler2D diffuse; uniform float lightLevel; void main() { - vec4 color = texture2D(diffuse, texCoord0); + vec4 color = texture(diffuse, texCoord0); outColor = vec4(lightLevel, lightLevel, lightLevel, 1.0f) * color; outColor.a = color.a; diff --git a/src/library/resources/shaders/animated/transparent_pbr.fs.glsl b/src/library/resources/shaders/animated/transparent_pbr.fs.glsl deleted file mode 100644 index c59a84d8..00000000 --- a/src/library/resources/shaders/animated/transparent_pbr.fs.glsl +++ /dev/null @@ -1,47 +0,0 @@ -#version 450 core -#define ambientLight 0.6f - -in vec2 texCoord0; -in vec3 normal; -in vec3 toLightVector; -in vec3 toCameraVector; - -out vec4 outColor; - -uniform sampler2D diffuse; - -uniform int intColor; -uniform float shineDamper; -uniform float reflectivity; -uniform float diffuseColorMix; -uniform float alpha; - -vec3 intToColor() { - return vec3((intColor >> 16 & 255) / 255.0, (intColor >> 8 & 255) / 255.0, (intColor & 255) / 255.0); -} - -void main() { - vec4 color = texture2D(diffuse, texCoord0); - - vec3 lightColor = intToColor(); - vec3 pixelmonColor = mix(lightColor, vec3(1.0, 1.0, 1.0), diffuseColorMix); - vec3 unitNormal = normalize(normal); - vec3 unitLightVector = normalize(toLightVector); - vec3 lightDir = -unitLightVector; - vec3 unitToCameraVector = normalize(toCameraVector); - - // Diffuse Lighting - float rawDiffuse = dot(unitNormal, unitLightVector); - float diffuse = max(rawDiffuse, ambientLight); - vec3 coloredDiffuse = diffuse * pixelmonColor; - - // Specular Lighting - vec3 reflectedLightDir = reflect(lightDir, unitNormal); - float rawSpecularFactor = dot(reflectedLightDir, unitToCameraVector); - float specularFactor = max(rawSpecularFactor, 0.0f); - float dampedFactor = pow(specularFactor, shineDamper); - vec3 finalSpecular = dampedFactor * reflectivity * lightColor; - - outColor = vec4(coloredDiffuse, 1.0f) * color + vec4(finalSpecular, 1.0f); - outColor.a = color.a; -} diff --git a/src/library/resources/shaders/animated/unlit.fs.glsl b/src/library/resources/shaders/animated/unlit.fs.glsl index 74c8f9b4..6488e693 100644 --- a/src/library/resources/shaders/animated/unlit.fs.glsl +++ b/src/library/resources/shaders/animated/unlit.fs.glsl @@ -1,4 +1,4 @@ -#version 450 core +#version 150 core #define ambientLight 0.6f in vec2 texCoord0; @@ -8,6 +8,6 @@ out vec4 outColor; uniform sampler2D diffuse; void main() { - vec4 color = texture2D(diffuse, texCoord0); + vec4 color = texture(diffuse, texCoord0); outColor = color; } diff --git a/src/library/resources/shaders/gui/gui.fs.glsl b/src/library/resources/shaders/gui/gui.fs.glsl deleted file mode 100644 index 472c736b..00000000 --- a/src/library/resources/shaders/gui/gui.fs.glsl +++ /dev/null @@ -1,17 +0,0 @@ -#version 450 core - -in vec2 texCoord0; - -out vec4 outColor; - -uniform sampler2D diffuse; - -void main() { - vec4 color = texture2D(diffuse, texCoord0); - - if (color.a < 0.1) { - discard; - } - - outColor = color; -} diff --git a/src/library/resources/shaders/gui/gui.vs.glsl b/src/library/resources/shaders/gui/gui.vs.glsl deleted file mode 100644 index d2db22ad..00000000 --- a/src/library/resources/shaders/gui/gui.vs.glsl +++ /dev/null @@ -1,16 +0,0 @@ -#version 450 - -layout(location = 0) in vec3 positions; -layout(location = 1) in vec2 texcoords; - -out vec2 texCoord0; - -uniform mat4 modelMatrix; - -void main() { - mat4 worldSpace = projectionMatrix * viewMatrix; - vec4 worldPosition = modelMatrix * vec4(positions, 1.0); - - texCoord0 = texcoords; - gl_Position = modelMatrix * vec4(positions, 1.0); -} \ No newline at end of file diff --git a/src/library/resources/shaders/stat_up/stat_up.fs.glsl b/src/library/resources/shaders/stat_up/stat_up.fs.glsl deleted file mode 100644 index b37b12ef..00000000 --- a/src/library/resources/shaders/stat_up/stat_up.fs.glsl +++ /dev/null @@ -1,19 +0,0 @@ -#version 450 core - -in vec2 texCoord0; -in vec3 normal; - -out vec4 outColor; - -uniform sampler2D diffuse; -uniform float time; - -void main() { - vec4 color = texture2D(diffuse, vec2(texCoord0.x, texCoord0.y + time)); - if (color.a < 0.1) discard; - - float gradientSlider = 1.5 - color.r; - vec3 orangeShade = vec3(229.0 / 255, 107.0 / 255, 0.0 / 255); - outColor = vec4(mix(color.rgb, orangeShade, max(0.0, gradientSlider)), color.a); - //outColor = vec4(1.0 - color.r, 1.0 - color.g, 1.0 - color.b, color.a); -} diff --git a/src/library/resources/shaders/stat_up/stat_up.vs.glsl b/src/library/resources/shaders/stat_up/stat_up.vs.glsl deleted file mode 100644 index 94fda709..00000000 --- a/src/library/resources/shaders/stat_up/stat_up.vs.glsl +++ /dev/null @@ -1,21 +0,0 @@ -#version 450 - -layout(location = 0) in vec3 positions; -layout(location = 1) in vec2 texcoords; -layout(location = 2) in vec3 inNormal; - -out vec2 texCoord0; -out vec3 normal; - -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 projectionMatrix; - -void main() { - mat4 worldSpace = projectionMatrix * viewMatrix; - vec4 worldPosition = modelMatrix * vec4(positions, 1.0); - - normal = (modelMatrix * vec4(inNormal, 0.0)).xyz; - texCoord0 = texcoords; - gl_Position = worldSpace * worldPosition; -} \ No newline at end of file diff --git a/src/library/resources/shaders/static/static.fs.glsl b/src/library/resources/shaders/static/static.fs.glsl deleted file mode 100644 index 24d99290..00000000 --- a/src/library/resources/shaders/static/static.fs.glsl +++ /dev/null @@ -1,22 +0,0 @@ -#version 450 core - -in vec2 texCoord0; -in vec3 normal; -in vec3 toLightVector; -in vec3 toCameraVector; - -out vec4 outColor; - -uniform sampler2D diffuse; - -uniform vec3 LIGHT_color; -uniform float LIGHT_shineDamper; -uniform float LIGHT_reflectivity; - -const float AMBIENT_LIGHT = 0.6f; - -void main() { - vec4 color = texture2D(diffuse, texCoord0); - if (color.a < 0.1) discard; - outColor = color; -} diff --git a/src/library/resources/shaders/static/static.vs.glsl b/src/library/resources/shaders/static/static.vs.glsl deleted file mode 100644 index f0ed7afc..00000000 --- a/src/library/resources/shaders/static/static.vs.glsl +++ /dev/null @@ -1,28 +0,0 @@ -#version 450 - -layout(location = 0) in vec3 positions; -layout(location = 1) in vec2 texcoords; -layout(location = 2) in vec3 inNormal; - -out vec2 texCoord0; -out vec3 toLightVector; -out vec3 toCameraVector; -out vec3 normal; - -uniform mat4 viewMatrix; -uniform mat4 modelMatrix; -uniform mat4 projectionMatrix; -uniform vec3 lightPosition; - -void main() { - - mat4 worldSpace = projectionMatrix * viewMatrix; - vec4 worldPosition = modelMatrix * vec4(positions, 1.0); - - normal = (modelMatrix * vec4(inNormal, 0.0)).xyz; - texCoord0 = texcoords; - gl_Position = worldSpace * worldPosition; - - toLightVector = lightPosition - worldPosition.xyz; - toCameraVector = (inverse(viewMatrix) * vec4(0.0, 0.0, 0.0, 1.0)).xyz - worldPosition.xyz; -} \ No newline at end of file diff --git a/src/main/java/gg/generations/rarecandy/tools/gui/GuiPipelines.java b/src/main/java/gg/generations/rarecandy/tools/gui/GuiPipelines.java index 03394728..7175e78f 100644 --- a/src/main/java/gg/generations/rarecandy/tools/gui/GuiPipelines.java +++ b/src/main/java/gg/generations/rarecandy/tools/gui/GuiPipelines.java @@ -27,17 +27,6 @@ public class GuiPipelines { material.blendType().disable(); }); - private static final Pipeline.Builder PBR = new Pipeline.Builder(BASE) - .supplyUniform("lightPosition", ctx -> ctx.uniform().uploadVec3f(new Vector3f(0, 2, 0))) - .supplyUniform("reflectivity", ctx -> ctx.uniform().uploadFloat(0.3f)) - .supplyUniform("shineDamper", ctx -> ctx.uniform().uploadFloat(0.3f)) - .supplyUniform("intColor", ctx -> ctx.uniform().uploadInt(0xFFFFFF)) - .supplyUniform("diffuseColorMix", ctx -> ctx.uniform().uploadFloat(0.7f)); - - public static final Pipeline STATIC = new Pipeline.Builder(BASE) - .shader(builtin("static/static.vs.glsl"), builtin("static/static.fs.glsl")) - .build(); - public static final Pipeline.Builder LIGHT = new Pipeline.Builder(BASE) .supplyUniform("lightLevel", ctx -> ctx.uniform().uploadFloat(RareCandyCanvas.getLightLevel())); @@ -53,12 +42,6 @@ public class GuiPipelines { .shader(builtin("animated/animated.vs.glsl"), builtin("animated/unlit.fs.glsl")) .build(); - - public static final Pipeline POKEMON_EYES = new Pipeline.Builder(BASE) - .shader(builtin("animated/animated.vs.glsl"), builtin("animated/animated_pbr.fs.glsl")) - .supplyUniform("boneTransforms", ctx -> ctx.uniform().uploadMat4fs(ctx.instance() instanceof AnimatedObjectInstance instance ? instance.getTransforms() : AnimationController.NO_ANIMATION)) - .build(); - public static void onInitialize() { } diff --git a/src/main/java/gg/generations/rarecandy/tools/gui/RareCandyCanvas.java b/src/main/java/gg/generations/rarecandy/tools/gui/RareCandyCanvas.java index 5e9319f1..1b758c45 100644 --- a/src/main/java/gg/generations/rarecandy/tools/gui/RareCandyCanvas.java +++ b/src/main/java/gg/generations/rarecandy/tools/gui/RareCandyCanvas.java @@ -156,9 +156,9 @@ protected void load(RareCandy renderer, PixelAsset is, Co var loader = renderer.getLoader(); loader.createObject( () -> is, - (gltfModel, smdFileMap, gfbFileMap, images, config, object) -> { + (gltfModel, smdFileMap, gfbFileMap, tramnAnimations, images, config, object) -> { var glCalls = new ArrayList(); - ModelLoader.create2(object, gltfModel, smdFileMap, gfbFileMap, images, config, glCalls, supplier); + ModelLoader.create2(object, gltfModel, smdFileMap, gfbFileMap, tramnAnimations, images, config, glCalls, supplier); return glCalls; }, onFinish diff --git a/src/main/java/gg/generations/rarecandy/tools/pixelmonTester/Pipelines.java b/src/main/java/gg/generations/rarecandy/tools/pixelmonTester/Pipelines.java deleted file mode 100644 index 3be67a03..00000000 --- a/src/main/java/gg/generations/rarecandy/tools/pixelmonTester/Pipelines.java +++ /dev/null @@ -1,43 +0,0 @@ -package gg.generations.rarecandy.tools.pixelmonTester; - -import gg.generations.rarecandy.renderer.pipeline.Pipeline; -import gg.generations.rarecandy.renderer.storage.AnimatedObjectInstance; -import org.joml.Matrix4f; -import org.joml.Vector3f; - -import java.io.IOException; - -public class Pipelines { - - public final Pipeline animated; - - public Pipelines(Matrix4f projectionMatrix) { - var base = new Pipeline.Builder() - .supplyUniform("viewMatrix", ctx -> ctx.uniform().uploadMat4f(ctx.instance().viewMatrix())) - .supplyUniform("modelMatrix", ctx -> ctx.uniform().uploadMat4f(ctx.instance().transformationMatrix())) - .supplyUniform("projectionMatrix", (ctx) -> ctx.uniform().uploadMat4f(projectionMatrix)) - .supplyUniform("lightPosition", ctx -> ctx.uniform().uploadVec3f(new Vector3f(0, 2, 0))) - .supplyUniform("reflectivity", ctx -> ctx.uniform().uploadFloat(0.3f)) - .supplyUniform("shineDamper", ctx -> ctx.uniform().uploadFloat(0.3f)) - .supplyUniform("intColor", ctx -> ctx.uniform().uploadInt(0xFFFFFF)) - .supplyUniform("diffuseColorMix", ctx -> ctx.uniform().uploadFloat(0.7f)) - .supplyUniform("diffuse", ctx -> { - ctx.object().getMaterial(ctx.instance().materialId()).getDiffuseTexture().bind(0); - ctx.uniform().uploadInt(0); - }); - - this.animated = new Pipeline.Builder(base) - .shader(builtin("animated/animated.vs.glsl"), builtin("animated/animated_pbr.fs.glsl")) - .supplyUniform("boneTransforms", ctx -> ctx.uniform().uploadMat4fs(((AnimatedObjectInstance) ctx.instance()).getTransforms())) - .build(); - } - - private static String builtin(String name) { - try (var is = Pipeline.class.getResourceAsStream("/shaders/" + name)) { - assert is != null; - return new String(is.readAllBytes()); - } catch (IOException e) { - throw new RuntimeException("Failed to read built in shader", e); - } - } -} diff --git a/src/main/java/gg/generations/rarecandy/tools/pixelmonTester/PokemonTest.java b/src/main/java/gg/generations/rarecandy/tools/pixelmonTester/PokemonTest.java index 94bfbdc7..b7940e8a 100644 --- a/src/main/java/gg/generations/rarecandy/tools/pixelmonTester/PokemonTest.java +++ b/src/main/java/gg/generations/rarecandy/tools/pixelmonTester/PokemonTest.java @@ -30,7 +30,7 @@ public class PokemonTest { private final List instances = new ArrayList<>(); private final Path path; public RareCandy renderer; - public Pipelines pipelines; +// public Pipelines pipelines; private boolean rotate; public PokemonTest(String[] args) { @@ -44,25 +44,25 @@ private static int clamp(int value, int max) { } public void init(RareCandy scene, Matrix4f projectionMatrix, Matrix4f viewMatrix) { - this.renderer = scene; - this.pipelines = new Pipelines(projectionMatrix); - - loadPokemonModel(scene, this::getAsset, model -> { - var variants = List.of("none-normal");//, "none-shiny"); - - for (int i = 0; i < variants.size(); i++) { - var instance = new AnimatedObjectInstance(new Matrix4f(), viewMatrix, variants.get(i)); - instance.transformationMatrix() - .translate(new Vector3f(i * 4 - 2, -1f, 2)) - .rotate((float) Math.toRadians(-180), new Vector3f(0, 1, 0)) - .scale(0.4f); - - if (rotate) instance.transformationMatrix() - .rotate((float) Math.toRadians(-90), new Vector3f(0, 1, 0)); - - instances.add(scene.objectManager.add(model, instance)); - } - }); +// this.renderer = scene; +// this.pipelines = new Pipelines(projectionMatrix); +// +// loadPokemonModel(scene, this::getAsset, model -> { +// var variants = List.of("none-normal");//, "none-shiny"); +// +// for (int i = 0; i < variants.size(); i++) { +// var instance = new AnimatedObjectInstance(new Matrix4f(), viewMatrix, variants.get(i)); +// instance.transformationMatrix() +// .translate(new Vector3f(i * 4 - 2, -1f, 2)) +// .rotate((float) Math.toRadians(-180), new Vector3f(0, 1, 0)) +// .scale(0.4f); +// +// if (rotate) instance.transformationMatrix() +// .rotate((float) Math.toRadians(-90), new Vector3f(0, 1, 0)); +// +// instances.add(scene.objectManager.add(model, instance)); +// } +// }); } private PixelAsset getAsset() { @@ -83,10 +83,10 @@ protected void load(RareCandy renderer, Supplier { + (gltfModel, smdFileMap, gfbFileMap, tranmFilesMaps, images, config, object) -> { var glCalls = new ArrayList(); try { - ModelLoader.create2(object, gltfModel, smdFileMap, gfbFileMap, images, config, glCalls, supplier); + ModelLoader.create2(object, gltfModel, smdFileMap, gfbFileMap, tranmFilesMaps, images, config, glCalls, supplier); } catch (Exception e) { throw new RuntimeException("Failed to interpret data", e); } @@ -96,9 +96,9 @@ protected void load(RareCandy renderer, Supplier assetSupplier, Consumer> onFinish) { - load(renderer, assetSupplier, s -> pipelines.animated, onFinish, AnimatedMeshObject::new); - } +// protected void loadPokemonModel(RareCandy renderer, Supplier assetSupplier, Consumer> onFinish) { +// load(renderer, assetSupplier, s -> pipelines.animated, onFinish, AnimatedMeshObject::new); +// } public void leftTap() { var map = instances.get(0).getAnimationsIfAvailable();