chore: pass flag to overworld map for loading custom data
This commit is contained in:
@@ -86,8 +86,10 @@ absl::Status Overworld::Load(Rom &rom) {
|
||||
AssembleMap16Tiles();
|
||||
RETURN_IF_ERROR(DecompressAllMapTiles())
|
||||
|
||||
const bool load_custom_overworld = flags()->overworld.kLoadCustomOverworld;
|
||||
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();
|
||||
LoadEntrances();
|
||||
@@ -1516,8 +1518,10 @@ absl::Status Overworld::LoadPrototype(Rom &rom,
|
||||
AssembleMap16Tiles();
|
||||
RETURN_IF_ERROR(DecompressProtoMapTiles(tilemap_filename))
|
||||
|
||||
const bool load_custom_overworld = flags()->overworld.kLoadCustomOverworld;
|
||||
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();
|
||||
LoadEntrances();
|
||||
|
||||
@@ -19,11 +19,12 @@ namespace zelda3 {
|
||||
namespace overworld {
|
||||
|
||||
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) {
|
||||
LoadAreaInfo();
|
||||
|
||||
if (flags()->kLoadCustomOverworld) {
|
||||
if (load_custom_data) {
|
||||
// If the custom overworld ASM has NOT already been applied, manually set
|
||||
// the vanilla values.
|
||||
uint8_t asm_version = rom_[OverworldCustomASMHasBeenApplied];
|
||||
|
||||
@@ -67,7 +67,8 @@ constexpr int OverworldCustomTileGFXGroupEnabled = 0x140148;
|
||||
class OverworldMap : public editor::context::GfxContext {
|
||||
public:
|
||||
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,
|
||||
OWBlockset& world_blockset);
|
||||
|
||||
Reference in New Issue
Block a user