61 lines
1.3 KiB
C++
61 lines
1.3 KiB
C++
#pragma once
|
|
|
|
#include <cstddef>
|
|
#include <cstdint>
|
|
#include <string>
|
|
#include <vector>
|
|
|
|
namespace gc {
|
|
|
|
struct RvbChunk {
|
|
std::string tag;
|
|
uint32_t offset = 0;
|
|
uint32_t size = 0;
|
|
};
|
|
|
|
// A PREP entry binds an animation/action name to an instance path in the
|
|
// exported menu scene. These names are what game471.exe uses to drive the
|
|
// select-music and difficulty state machines.
|
|
struct RvbBinding {
|
|
std::string action;
|
|
std::string instancePath;
|
|
};
|
|
|
|
struct RvbImageResource {
|
|
std::string fileName;
|
|
std::string symbolName;
|
|
uint32_t width = 0;
|
|
uint32_t height = 0;
|
|
};
|
|
|
|
struct RvbExport {
|
|
std::string definitionName;
|
|
std::string linkageName;
|
|
};
|
|
|
|
struct RvbNode {
|
|
std::string tag;
|
|
uint32_t offset = 0;
|
|
uint32_t size = 0;
|
|
uint32_t localDataOffset = 0;
|
|
uint32_t localDataSize = 0;
|
|
std::vector<RvbNode> children;
|
|
};
|
|
|
|
struct RvbScene {
|
|
uint8_t framesPerSecond = 0;
|
|
uint16_t sourceWidth = 0;
|
|
uint16_t sourceHeight = 0;
|
|
std::vector<RvbChunk> chunks;
|
|
std::vector<RvbBinding> bindings;
|
|
std::vector<RvbImageResource> images;
|
|
std::vector<RvbExport> exports;
|
|
std::vector<RvbNode> roots;
|
|
};
|
|
|
|
bool ParseRvbScene(const std::vector<uint8_t>& bytes,
|
|
RvbScene* scene,
|
|
std::string* error = nullptr);
|
|
|
|
} // namespace gc
|