mirror of
https://github.com/zeldaret/tmc
synced 2026-08-27 00:14:02 -04:00
removed some unnecessary vectors
This commit is contained in:
@@ -5,20 +5,16 @@
|
||||
|
||||
void SpriteFrameAsset::convertToHumanReadable(const std::vector<char>& baserom) {
|
||||
Reader reader(baserom, start, size);
|
||||
std::vector<std::string> lines;
|
||||
auto file = util::open_file(assetPath, "w");
|
||||
while (reader.cursor < size) {
|
||||
u8 num_gfx_tiles = reader.read_u8();
|
||||
u8 unk = reader.read_u8();
|
||||
u16 first_gfx_tile_index = reader.read_u16();
|
||||
|
||||
lines.push_back(fmt::format("\tsprite_frame first_tile_index={:#x}", first_gfx_tile_index));
|
||||
lines.push_back(opt_param(", num_tiles={}", 0, num_gfx_tiles));
|
||||
lines.push_back(opt_param(", unknown={:#x}", 0, unk));
|
||||
lines.emplace_back("\n");
|
||||
}
|
||||
|
||||
auto file = util::open_file(assetPath, "w");
|
||||
for (const auto& line : lines) {
|
||||
auto line = fmt::format("\tsprite_frame first_tile_index={:#x}", first_gfx_tile_index);
|
||||
line += opt_param(", num_tiles={}", 0, num_gfx_tiles);
|
||||
line += opt_param(", unknown={:#x}", 0, unk);
|
||||
std::fputs(line.c_str(), file.get());
|
||||
std::fputc('\n', file.get());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user