diff options
| author | Henny022p <info@henny022.de> | 2021-11-23 20:22:22 +0100 |
|---|---|---|
| committer | Henny022p <info@henny022.de> | 2021-11-23 20:22:22 +0100 |
| commit | 794d5fc97cb01a70c8579dc08962b667edf5a29e (patch) | |
| tree | f1655a0b50bf25b9cebc2849f6da520599d933e9 /tools/src/asset_processor/assets/exitlist.cpp | |
| parent | dee773da4a12af1c48bf58d6275fe4fed20871b6 (diff) | |
cleaned asset_processor to build without warnings
Diffstat (limited to 'tools/src/asset_processor/assets/exitlist.cpp')
| -rw-r--r-- | tools/src/asset_processor/assets/exitlist.cpp | 37 |
1 files changed, 19 insertions, 18 deletions
diff --git a/tools/src/asset_processor/assets/exitlist.cpp b/tools/src/asset_processor/assets/exitlist.cpp index c4e193c6..ad71dba7 100644 --- a/tools/src/asset_processor/assets/exitlist.cpp +++ b/tools/src/asset_processor/assets/exitlist.cpp @@ -2,11 +2,12 @@ #include "reader.h" #include <fstream> #include <iostream> +#include <fmt/format.h> void ExitListAsset::convertToHumanReadable(const std::vector<char>& baserom) { - Reader reader(baserom, this->start, this->size); + Reader reader(baserom, start, size); std::vector<std::string> lines; - while (reader.cursor < this->size) { + while (reader.cursor < size) { u16 transition_type = reader.read_u16(); u16 x_pos = reader.read_u16(); u16 y_pos = reader.read_u16(); @@ -21,26 +22,26 @@ void ExitListAsset::convertToHumanReadable(const std::vector<char>& baserom) { u16 unknown_5 = reader.read_u16(); u16 padding_1 = reader.read_u16(); if (transition_type == 0xffff) { - lines.push_back("\texit_list_end\n"); + lines.emplace_back("\texit_list_end\n"); break; } - lines.push_back(string_format("\texit transition=%d", transition_type)); - lines.push_back(opt_param(", x=0x%x", 0, x_pos)); - lines.push_back(opt_param(", y=0x%x", 0, y_pos)); - lines.push_back(opt_param(", destX=0x%x", 0, dest_x)); - lines.push_back(opt_param(", destY=0x%x", 0, dest_y)); - lines.push_back(opt_param(", screenEdge=0x%x", 0, screen_edge)); - lines.push_back(opt_param(", destArea=0x%x", 0, dest_area)); - lines.push_back(opt_param(", destRoom=0x%x", 0, dest_room)); - lines.push_back(opt_param(", unknown=0x%x", 0, unknown_2)); - lines.push_back(opt_param(", unknown2=0x%x", 0, unknown_3)); - lines.push_back(opt_param(", unknown3=0x%x", 0, unknown_4)); - lines.push_back(opt_param(", unknown4=0x%x", 0, unknown_5)); - lines.push_back(opt_param(", padding=0x%x", 0, padding_1)); - lines.push_back("\n"); + lines.push_back(fmt::format("\texit transition={}", transition_type)); + lines.push_back(opt_param(", x={:#x}", 0, x_pos)); + lines.push_back(opt_param(", y={:#x}", 0, y_pos)); + lines.push_back(opt_param(", destX={:#x}", 0, dest_x)); + lines.push_back(opt_param(", destY={:#x}", 0, dest_y)); + lines.push_back(opt_param(", screenEdge={:#x}", 0, screen_edge)); + lines.push_back(opt_param(", destArea={:#x}", 0, dest_area)); + lines.push_back(opt_param(", destRoom={:#x}", 0, dest_room)); + lines.push_back(opt_param(", unknown={:#x}", 0, unknown_2)); + lines.push_back(opt_param(", unknown2={:#x}", 0, unknown_3)); + lines.push_back(opt_param(", unknown3={:#x}", 0, unknown_4)); + lines.push_back(opt_param(", unknown4={:#x}", 0, unknown_5)); + lines.push_back(opt_param(", padding={:#x}", 0, padding_1)); + lines.emplace_back("\n"); } - std::ofstream out(this->assetPath); + std::ofstream out(assetPath); for (const auto& line : lines) { out << line; } |
