Add frame-based RVB animation snapshots
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
|
||||
#include <array>
|
||||
#include <cstdint>
|
||||
#include <limits>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@@ -25,6 +26,12 @@ struct RvbImageDraw {
|
||||
// root timeline). Clips not mentioned here remain on their first FRAM.
|
||||
struct RvbSnapshotState {
|
||||
std::unordered_map<std::string, std::string> frameByPath;
|
||||
// Frame offset after a labeled play() entry point. The default resolves
|
||||
// to the following stop(), preserving the static snapshot behavior.
|
||||
uint32_t animationFrame = std::numeric_limits<uint32_t>::max();
|
||||
// Optional per-clip overrides allow a transition to advance while child
|
||||
// loops and unrelated state clips remain at their authored stop frames.
|
||||
std::unordered_map<std::string, uint32_t> animationFrameByPath;
|
||||
bool includeRootOther = false;
|
||||
};
|
||||
|
||||
@@ -46,6 +53,14 @@ bool BuildRvbSnapshot(const std::vector<uint8_t>& bytes,
|
||||
std::vector<RvbImageDraw>* draws,
|
||||
std::string* error = nullptr);
|
||||
|
||||
// Returns the longest play()..stop() span selected by this state. The result
|
||||
// includes the labeled entry frame and can be converted to seconds with the
|
||||
// scene frame rate.
|
||||
uint32_t MeasureRvbSnapshotAnimationFrames(const std::vector<uint8_t>& bytes,
|
||||
const RvbScene& scene,
|
||||
const RvbSnapshotState& state,
|
||||
std::string* error = nullptr);
|
||||
|
||||
// Builds an exported/linkage MovieClip without requiring it to be placed on
|
||||
// the root timeline. game471.exe uses this path for the twelve dynamically
|
||||
// instantiated select-music rows (mc_music_link / mc_index_link).
|
||||
|
||||
Reference in New Issue
Block a user