chore: pass flag to overworld map for loading custom data
This commit is contained in:
@@ -331,6 +331,10 @@ void OverworldEditor::DrawOverworldMapSettings() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void OverworldEditor::DrawCustomOverworldMapSettings() {
|
||||||
|
// TODO: Add @JaredBrian ZSCustomOverworld features to OverworldEditor
|
||||||
|
}
|
||||||
|
|
||||||
void OverworldEditor::DrawOverworldMaps() {
|
void OverworldEditor::DrawOverworldMaps() {
|
||||||
int xx = 0;
|
int xx = 0;
|
||||||
int yy = 0;
|
int yy = 0;
|
||||||
@@ -564,10 +568,13 @@ void OverworldEditor::CheckForMousePan() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: Add @JaredBrian ZSCustomOverworld features to OverworldEditor
|
|
||||||
void OverworldEditor::DrawOverworldCanvas() {
|
void OverworldEditor::DrawOverworldCanvas() {
|
||||||
if (all_gfx_loaded_) {
|
if (all_gfx_loaded_) {
|
||||||
DrawOverworldMapSettings();
|
if (flags()->overworld.kLoadCustomOverworld) {
|
||||||
|
DrawCustomOverworldMapSettings();
|
||||||
|
} else {
|
||||||
|
DrawOverworldMapSettings();
|
||||||
|
}
|
||||||
Separator();
|
Separator();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ class OverworldEditor : public Editor,
|
|||||||
* @brief Draws the overworld map settings. Graphics, palettes, etc.
|
* @brief Draws the overworld map settings. Graphics, palettes, etc.
|
||||||
*/
|
*/
|
||||||
void DrawOverworldMapSettings();
|
void DrawOverworldMapSettings();
|
||||||
|
void DrawCustomOverworldMapSettings();
|
||||||
|
|
||||||
void RefreshChildMap(int i);
|
void RefreshChildMap(int i);
|
||||||
void RefreshOverworldMap();
|
void RefreshOverworldMap();
|
||||||
|
|||||||
@@ -86,8 +86,10 @@ absl::Status Overworld::Load(Rom &rom) {
|
|||||||
AssembleMap16Tiles();
|
AssembleMap16Tiles();
|
||||||
RETURN_IF_ERROR(DecompressAllMapTiles())
|
RETURN_IF_ERROR(DecompressAllMapTiles())
|
||||||
|
|
||||||
|
const bool load_custom_overworld = flags()->overworld.kLoadCustomOverworld;
|
||||||
for (int map_index = 0; map_index < kNumOverworldMaps; ++map_index)
|
for (int map_index = 0; map_index < kNumOverworldMaps; ++map_index)
|
||||||
overworld_maps_.emplace_back(map_index, rom_, tiles16_);
|
overworld_maps_.emplace_back(map_index, rom_, tiles16_,
|
||||||
|
load_custom_overworld);
|
||||||
|
|
||||||
FetchLargeMaps();
|
FetchLargeMaps();
|
||||||
LoadEntrances();
|
LoadEntrances();
|
||||||
@@ -1516,8 +1518,10 @@ absl::Status Overworld::LoadPrototype(Rom &rom,
|
|||||||
AssembleMap16Tiles();
|
AssembleMap16Tiles();
|
||||||
RETURN_IF_ERROR(DecompressProtoMapTiles(tilemap_filename))
|
RETURN_IF_ERROR(DecompressProtoMapTiles(tilemap_filename))
|
||||||
|
|
||||||
|
const bool load_custom_overworld = flags()->overworld.kLoadCustomOverworld;
|
||||||
for (int map_index = 0; map_index < kNumOverworldMaps; ++map_index)
|
for (int map_index = 0; map_index < kNumOverworldMaps; ++map_index)
|
||||||
overworld_maps_.emplace_back(map_index, rom_, tiles16_);
|
overworld_maps_.emplace_back(map_index, rom_, tiles16_,
|
||||||
|
load_custom_overworld);
|
||||||
|
|
||||||
FetchLargeMaps();
|
FetchLargeMaps();
|
||||||
LoadEntrances();
|
LoadEntrances();
|
||||||
|
|||||||
@@ -19,11 +19,12 @@ namespace zelda3 {
|
|||||||
namespace overworld {
|
namespace overworld {
|
||||||
|
|
||||||
OverworldMap::OverworldMap(int index, Rom& rom,
|
OverworldMap::OverworldMap(int index, Rom& rom,
|
||||||
std::vector<gfx::Tile16>& tiles16)
|
std::vector<gfx::Tile16>& tiles16,
|
||||||
|
bool load_custom_data)
|
||||||
: index_(index), parent_(index), rom_(rom), tiles16_(tiles16) {
|
: index_(index), parent_(index), rom_(rom), tiles16_(tiles16) {
|
||||||
LoadAreaInfo();
|
LoadAreaInfo();
|
||||||
|
|
||||||
if (flags()->kLoadCustomOverworld) {
|
if (load_custom_data) {
|
||||||
// If the custom overworld ASM has NOT already been applied, manually set
|
// If the custom overworld ASM has NOT already been applied, manually set
|
||||||
// the vanilla values.
|
// the vanilla values.
|
||||||
uint8_t asm_version = rom_[OverworldCustomASMHasBeenApplied];
|
uint8_t asm_version = rom_[OverworldCustomASMHasBeenApplied];
|
||||||
|
|||||||
@@ -67,7 +67,8 @@ constexpr int OverworldCustomTileGFXGroupEnabled = 0x140148;
|
|||||||
class OverworldMap : public editor::context::GfxContext {
|
class OverworldMap : public editor::context::GfxContext {
|
||||||
public:
|
public:
|
||||||
OverworldMap() = default;
|
OverworldMap() = default;
|
||||||
OverworldMap(int index, Rom& rom, std::vector<gfx::Tile16>& tiles16);
|
OverworldMap(int index, Rom& rom, std::vector<gfx::Tile16>& tiles16,
|
||||||
|
bool load_custom_data = false);
|
||||||
|
|
||||||
absl::Status BuildMap(int count, int game_state, int world,
|
absl::Status BuildMap(int count, int game_state, int world,
|
||||||
OWBlockset& world_blockset);
|
OWBlockset& world_blockset);
|
||||||
|
|||||||
Reference in New Issue
Block a user