Extend GC stage and TUMO parsing
This commit is contained in:
@@ -138,6 +138,9 @@ struct CameraPoint {
|
||||
struct ParticlePoint {
|
||||
static constexpr size_t kRecordSize = 44;
|
||||
|
||||
// TuneBGEffectData in Android libtune.so. GameScene::ExecFlowItem uses
|
||||
// these authored keys to spawn the stage's flowing background items.
|
||||
|
||||
uint32_t timeMs = 0;
|
||||
uint32_t enabled = 0;
|
||||
uint32_t shape = 0;
|
||||
@@ -157,6 +160,16 @@ struct VisualizerPoint {
|
||||
Color color;
|
||||
};
|
||||
|
||||
struct BackgroundImagePoint {
|
||||
static constexpr size_t kRecordSize = 20;
|
||||
|
||||
uint32_t timeMs = 0;
|
||||
uint32_t mode = 0;
|
||||
uint32_t atlasIndex = 0;
|
||||
int32_t textureIndex = -1;
|
||||
Color color;
|
||||
};
|
||||
|
||||
struct BackgroundColorPoint {
|
||||
static constexpr size_t kRecordSize = 22;
|
||||
|
||||
@@ -166,27 +179,27 @@ struct BackgroundColorPoint {
|
||||
Color bottomRight;
|
||||
Color bottomLeft;
|
||||
bool interpolateToNext = false;
|
||||
bool audioReactive = false;
|
||||
bool rhythmReactive = false;
|
||||
};
|
||||
|
||||
struct VisibilityPoint {
|
||||
uint32_t timeMs = 0;
|
||||
bool fadeOut = false;
|
||||
bool fadeIn = false;
|
||||
bool repeat = false; // wire +4: member of a repeating key range
|
||||
bool interpolate = false; // wire +5: interpolate/fade into this key
|
||||
bool visible = false;
|
||||
};
|
||||
|
||||
struct TransformPoint {
|
||||
uint32_t timeMs = 0;
|
||||
bool tweenTowards = false;
|
||||
bool tweenAway = false;
|
||||
bool repeat = false; // wire +4: member of a repeating key range
|
||||
bool interpolate = false; // wire +5: interpolate to the following key
|
||||
float value[3] = {0.0f, 0.0f, 0.0f};
|
||||
};
|
||||
|
||||
struct ObjectColorPoint {
|
||||
uint32_t timeMs = 0;
|
||||
bool tweenTowards = false;
|
||||
bool tweenAway = false;
|
||||
bool repeat = false; // wire +4: member of a repeating key range
|
||||
bool interpolate = false; // wire +5: interpolate to the following key
|
||||
Color color;
|
||||
};
|
||||
|
||||
@@ -221,13 +234,24 @@ struct ParsedStagePattern {
|
||||
std::vector<CameraPoint> cameras;
|
||||
std::vector<ParticlePoint> particles;
|
||||
std::vector<VisualizerPoint> visualizer;
|
||||
std::vector<std::string> backgroundTextureNames;
|
||||
std::vector<BackgroundImagePoint> backgroundImages;
|
||||
std::vector<BackgroundColorPoint> backgroundColors;
|
||||
std::vector<std::string> modelNames;
|
||||
std::vector<std::string> fragmentShaderNames;
|
||||
std::vector<StageObject> objects;
|
||||
};
|
||||
|
||||
struct StageExtension {
|
||||
std::array<std::vector<NoteSetting>, 4> noteSettings;
|
||||
uint32_t unknown = 0;
|
||||
std::vector<StageNote> notes;
|
||||
size_t trailingBytes = 0;
|
||||
};
|
||||
|
||||
bool ParseStagePattern(const StageDat& dat, ParsedStagePattern* out, std::string* err);
|
||||
bool ParseStageExtension(const std::vector<uint8_t>& bytes, StageExtension* out,
|
||||
std::string* err);
|
||||
|
||||
} // namespace gc
|
||||
|
||||
|
||||
@@ -17,9 +17,11 @@ struct TumoGeometry {
|
||||
std::vector<TumoVertex> triangles;
|
||||
std::vector<TumoVertex> solidLines;
|
||||
std::vector<TumoVertex> wireframeLines;
|
||||
std::uint32_t meshCount = 0;
|
||||
std::uint32_t nodeCount = 0;
|
||||
};
|
||||
|
||||
// Decodes the common one-mesh TUMO layout used by gameplay stage objects.
|
||||
// Decodes and aggregates every static TUMO mesh used by gameplay stage objects.
|
||||
// Polygon fans are expanded on the host so the PSP only has to submit flat
|
||||
// GU_TRIANGLES/GU_LINES arrays.
|
||||
bool LoadTumoGeometry(const std::string& path, TumoGeometry* out, std::string* error);
|
||||
|
||||
Reference in New Issue
Block a user