yaze 0.3.2
Link to the Past ROM Editor
 
Loading...
Searching...
No Matches
yaze::zelda3::OverworldUpgradeSystem Class Reference

Service responsible for applying the ZSCustomOverworld ASM patch and updating ROM version markers for A Link to the Past. More...

#include <overworld_upgrade_system.h>

Collaboration diagram for yaze::zelda3::OverworldUpgradeSystem:

Public Member Functions

 OverworldUpgradeSystem (Rom &rom)
 Constructs the upgrade system.
 
absl::Status ApplyZSCustomOverworldASM (int target_version)
 Apply ZSCustomOverworld ASM patch to upgrade ROM version.
 

Private Member Functions

absl::Status UpdateROMVersionMarkers (int target_version)
 Update ROM version markers and feature flags after ASM patching. This is an internal sub-step of the upgrade process.
 

Private Attributes

Romrom_
 

Detailed Description

Service responsible for applying the ZSCustomOverworld ASM patch and updating ROM version markers for A Link to the Past.

This system encapsulates the destructive logic of upgrading a vanilla ROM to support expanded overworld features (v2 and v3).

Definition at line 19 of file overworld_upgrade_system.h.

Constructor & Destructor Documentation

◆ OverworldUpgradeSystem()

yaze::zelda3::OverworldUpgradeSystem::OverworldUpgradeSystem ( Rom & rom)
explicit

Constructs the upgrade system.

Parameters
romThe ROM to be mutated. Must be valid for the lifetime of this object.

Definition at line 18 of file overworld_upgrade_system.cc.

Member Function Documentation

◆ ApplyZSCustomOverworldASM()

absl::Status yaze::zelda3::OverworldUpgradeSystem::ApplyZSCustomOverworldASM ( int target_version)

Apply ZSCustomOverworld ASM patch to upgrade ROM version.

Parameters
target_versionTarget version (2 for v2, 3 for v3).
Returns
OK if the patch was successful, or an error detailing the ASM failure.

Definition at line 20 of file overworld_upgrade_system.cc.

References yaze::util::GetResourcePath(), yaze::Rom::LoadFromData(), LOG_DEBUG, LOG_ERROR, yaze::zelda3::OverworldCustomASMHasBeenApplied, RETURN_IF_ERROR, rom_, UpdateROMVersionMarkers(), and yaze::Rom::vector().

Here is the call graph for this function:

◆ UpdateROMVersionMarkers()

Member Data Documentation

◆ rom_

Rom& yaze::zelda3::OverworldUpgradeSystem::rom_
private

The documentation for this class was generated from the following files: