Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions src/mars_patcher/auto_generated_types.py
Original file line number Diff line number Diff line change
Expand Up @@ -624,5 +624,8 @@ class Marsschema(typ.TypedDict, total=False):
RoomNames: typ.Annotated[list[MarsschemaRoomnamesItem], 'Unique items']
"""Specifies a name to be displayed when the A Button is pressed on the pause menu."""

RevealHiddenTiles: bool = False
"""When enabled, reveals normally hidden blocks that are breakable by upgrades. Hidden pickup tanks are not revealed regardless of this setting."""


MarsSchema: typ.TypeAlias = Marsschema
1 change: 1 addition & 0 deletions src/mars_patcher/constants/reserved_space.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,3 +26,4 @@ class ReservedConstants:
MISSILE_LIMIT_ADDR = 0x7FF06A
MINOR_LOCS_ARRAY_ADDR = 0x7FF06C
ROOM_NAMES_TABLE_ADDR = 0x7FF070
REVEAL_HIDDEN_TILES_ADDR = 0x7FF08C
7 changes: 6 additions & 1 deletion src/mars_patcher/data/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -651,6 +651,11 @@
},
"required": ["Area", "Room", "Name"]
}
},
"RevealHiddenTiles": {
"type": "boolean",
"description": "When enabled, reveals normally hidden blocks that are breakable by upgrades. Hidden pickup tanks are not revealed regardless of this setting.",
"default": false
}
},
"required": [
Expand Down Expand Up @@ -961,4 +966,4 @@
"default": "OPEN"
}
}
}
}
4 changes: 4 additions & 0 deletions src/mars_patcher/misc_patches.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,3 +70,7 @@ def apply_pbs_without_bombs(rom: Rom) -> None:

def apply_anti_softlock_edits(rom: Rom) -> None:
apply_patch_in_data_path(rom, "anti_softlock.ips")


def apply_reveal_hidden_tiles(rom: Rom) -> None:
rom.write_8(ReservedConstants.REVEAL_HIDDEN_TILES_ADDR, 1)
4 changes: 4 additions & 0 deletions src/mars_patcher/patcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
from mars_patcher.misc_patches import (
apply_anti_softlock_edits,
apply_pbs_without_bombs,
apply_reveal_hidden_tiles,
apply_unexplored_map,
change_missile_limit,
disable_demos,
Expand Down Expand Up @@ -166,6 +167,9 @@ def patch(
if patch_data.get("UnexploredMap"):
apply_unexplored_map(rom)

if patch_data.get("RevealHiddenTiles"):
apply_reveal_hidden_tiles(rom)

if patch_data.get("DoorLocks") or "HideDoorsOnMinimap" in patch_data:
remove_door_colors_on_minimap(rom)

Expand Down