#pragma once #include "gc/RvbScene.hpp" #include #include #include #include #include namespace gc { struct RvbImageDraw { std::string imageSymbol; std::string instancePath; // top-left, top-right, bottom-left, bottom-right in the RVB canvas std::array, 4> corners{}; std::array color{1.0f, 1.0f, 1.0f}; float alpha = 1.0f; uint32_t depth = 0; }; // A Flash-style MovieClip path mapped to the labeled frame that should be // visible. Paths are the same absolute paths exported in PREP ("/" is the // root timeline). Clips not mentioned here remain on their first FRAM. struct RvbSnapshotState { std::unordered_map frameByPath; bool includeRootOther = false; }; // Builds the display list produced by the first frame of the root timeline // and the first frame of every placed MovieClip. This is the exact static // base of the original scene; later timeline frames and ActionScript state // changes can be layered on top as their opcodes are recovered. bool BuildRvbInitialSnapshot(const std::vector& bytes, const RvbScene& scene, std::vector* draws, std::string* error = nullptr); // Builds the display list at selected labeled frames. RVB FRAM records are // deltas, so this applies PLC3/RMOV commands in order through each requested // frame instead of treating a frame as a self-contained draw list. bool BuildRvbSnapshot(const std::vector& bytes, const RvbScene& scene, const RvbSnapshotState& state, std::vector* draws, 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). bool BuildRvbSymbolSnapshot(const std::vector& bytes, const RvbScene& scene, const std::string& symbolName, const RvbSnapshotState& state, std::vector* draws, std::string* error = nullptr); } // namespace gc