Store converted binary graphics data in ScreenEditor and rename save functions for clarity
This commit is contained in:
@@ -503,6 +503,7 @@ void ScreenEditor::LoadBinaryGfx() {
|
||||
std::vector<uint8_t> bin_data((std::istreambuf_iterator<char>(file)),
|
||||
std::istreambuf_iterator<char>());
|
||||
auto converted_bin = gfx::SnesTo8bppSheet(bin_data, 4, 4);
|
||||
gfx_bin_data_ = converted_bin;
|
||||
tile16_sheet_.clear();
|
||||
if (LoadDungeonMapTile16(converted_bin, true).ok()) {
|
||||
sheets_.clear();
|
||||
|
||||
@@ -90,6 +90,7 @@ class ScreenEditor : public SharedRom, public Editor {
|
||||
std::vector<zelda3::screen::DungeonMap> dungeon_maps_;
|
||||
std::vector<std::vector<std::array<std::string, 25>>> dungeon_map_labels_;
|
||||
std::array<uint16_t, 4> current_tile16_data_;
|
||||
std::vector<uint8_t> gfx_bin_data_;
|
||||
|
||||
absl::Status status_;
|
||||
|
||||
|
||||
@@ -527,9 +527,9 @@ absl::Status Overworld::LoadSpritesFromMap(int sprites_per_gamestate_ptr,
|
||||
|
||||
absl::Status Overworld::Save(Rom &rom) {
|
||||
rom_ = rom;
|
||||
if (expanded_tile16_) RETURN_IF_ERROR(SaveMap16TilesExpanded())
|
||||
if (expanded_tile16_) RETURN_IF_ERROR(SaveMap16Expanded())
|
||||
RETURN_IF_ERROR(SaveMap16Tiles())
|
||||
if (expanded_tile32_) RETURN_IF_ERROR(SaveMap32TilesExpanded())
|
||||
if (expanded_tile32_) RETURN_IF_ERROR(SaveMap32Expanded())
|
||||
RETURN_IF_ERROR(SaveMap32Tiles())
|
||||
RETURN_IF_ERROR(SaveOverworldMaps())
|
||||
RETURN_IF_ERROR(SaveEntrances())
|
||||
|
||||
Reference in New Issue
Block a user