Skip to content

Commit

Permalink
Update v23.3.0
Browse files Browse the repository at this point in the history
  • Loading branch information
Admentus64 committed Mar 12, 2024
1 parent 6e11d2f commit cc5d4f2
Show file tree
Hide file tree
Showing 8 changed files with 242 additions and 205 deletions.
Binary file modified Files/Games/Majora's Mask/redux.ppf
Binary file not shown.
142 changes: 81 additions & 61 deletions Files/Games/Majora's Mask/symbols.json
@@ -1,69 +1,89 @@
{
"CFG_B_BUTTON_ITEM_ENABLED": "03800047",
"CFG_BOSS_REMAINS_BOMBCHU_DROPS": "03800056",
"CFG_BOSS_REMAINS_DEKU_HOP": "03800054",
"CFG_BOSS_REMAINS_HEALTH_BAR": "03800055",
"CFG_BOSS_REMAINS_UNDERWATER_OCARINA": "03800053",
"CFG_B_BUTTON_ITEM_ENABLED": "03800048",
"CFG_CLOCK_CONTROL_ENABLED": "03800042",
"CFG_DUAL_DPAD_ENABLED": "03800041",
"CFG_FLOW_OF_TIME_ENABLED": "03800048",
"CFG_FPS_ENABLED": "0380004E",
"CFG_HIDE_HUD_ENABLED": "03800043",
"CFG_INFINITE_AMMO": "0380004C",
"CFG_INFINITE_HEALTH": "0380004A",
"CFG_INFINITE_MAGIC": "0380004B",
"CFG_INFINITE_RUPEES": "0380004D",
"CFG_INSTANT_ELEGY_ENABLED": "03800049",
"CFG_INVENTORY_EDITOR_ENABLED": "0380004F",
"CFG_OCARINA_ICONS_ENABLED": "03800042",
"CFG_RUPEE_DRAIN": "03800050",
"CFG_SKIP_GUARD_ENABLED": "03800044",
"CFG_SWAP_ENABLED": "03800045",
"CFG_UNEQUIP_ENABLED": "03800046",
"CFG_FIERCE_DEITY_GIANTS_MASK": "03800057",
"CFG_FLOW_OF_TIME_ENABLED": "03800049",
"CFG_FPS_ENABLED": "03800050",
"CFG_HIDE_HUD_ENABLED": "03800044",
"CFG_INFINITE_AMMO": "0380004E",
"CFG_INFINITE_HEALTH": "0380004C",
"CFG_INFINITE_MAGIC": "0380004D",
"CFG_INFINITE_RUPEES": "0380004F",
"CFG_INSTANT_ELEGY_ENABLED": "0380004A",
"CFG_INVENTORY_EDITOR_ENABLED": "03800051",
"CFG_INVERSE_AIM": "0380004B",
"CFG_OCARINA_ICONS_ENABLED": "03800043",
"CFG_RUPEE_DRAIN": "03800052",
"CFG_SKIP_GUARD_ENABLED": "03800045",
"CFG_SWAP_ENABLED": "03800046",
"CFG_UNEQUIP_ENABLED": "03800047",
"CFG_WS_ENABLED": "03800040",
"DPAD_CONFIG": "03811990",
"DPAD_TEXTURE": "03814828",
"EXT_MSG_DATA_FILE": "038122E8",
"EXT_MSG_TABLE": "038137A8",
"EXT_MSG_TABLE_COUNT": "03812280",
"EXT_OBJECTS": "03812310",
"FONT_TEXTURE": "03815828",
"DPAD_CONFIG": "03818610",
"DPAD_TEXTURE": "0381A710",
"DUNGEON_MAP_LINK_HEAD_TEXTURE": "0381DF58",
"EXT_OBJECTS": "03818DD0",
"FONT_TEXTURE": "0381B710",
"G_C_HEAP": "03820000",
"G_PAYLOAD_ADDR": "03800000",
"HASH_ICONS": "03811A24",
"HUD_COLOR_CONFIG": "03811A8C",
"ITEM_OVERRIDE_COUNT": "0381227C",
"ITEM_OVERRIDE_ENTRIES": "03812528",
"MISC_CONFIG": "03812094",
"MMR_CONFIG": "03811B8C",
"MUSIC_CONFIG": "038120BC",
"HUD_COLOR_CONFIG": "038186AC",
"HUD_TOGGLE_TEXTURE": "0381DED8",
"ITEM_OVERRIDE_COUNT": "03818BD8",
"ITEM_OVERRIDE_ENTRIES": "03818F9C",
"MISC_CONFIG": "03818914",
"MMR_CONFIG": "0381878C",
"MUSIC_CONFIG": "038189C8",
"OPTIONS_CONTEXT": "0380003C",
"PAYLOAD_END": "03815830",
"PARAMETER_AMMO_DIGIT_TEXTURE": "0381D1D8",
"PARAMETER_CLOCK_TEXTURE": "0381D458",
"PARAMETER_COUNTER_TEXTURE": "0381CBD8",
"PARAMETER_NOTE_BUTTONS_TEXTURE": "0381D558",
"PARAMETER_SUN_MOON_TEXTURE": "0381DA58",
"PAYLOAD_END": "0381E160",
"PAYLOAD_START": "03800000",
"SAVE_FILE_CONFIG": "03812150",
"TOWN_FAIRY_BYTES": "03813AA8",
"WORLD_COLOR_CONFIG": "03812220",
"block": "038122B6",
"deku_stick_timer_switch": "038122C8",
"dpad_alt": "038122B9",
"elegy_timer": "038122C2",
"forceSpawn": "038122FC",
"fps_switch": "03812279",
"gExternalEffects": "038119AC",
"gHeapNext": "03812308",
"gObjheap": "038139A8",
"gObjheapItems": "038139C0",
"gPlayUpdateInput": "03812410",
"gSetupDb": "038121D0",
"gSpriteDpad": "038121C0",
"gSpriteFairy": "03812180",
"gSpriteFont": "038121B0",
"gSpriteIcon": "038121A0",
"gSpriteIcon24": "03812190",
"gStaticAddressConfig": "038121F8",
"hud_counter": "038122B7",
"hud_hearts_hide": "03812278",
"hud_hide": "038122B8",
"last_time": "038122C6",
"pressed": "038122B0",
"redraw_b_button": "038122F4",
"rupee_drain_frames": "038122BB",
"rupee_drain_secs": "038122BA",
"started_timer": "038122C4",
"time_tracker": "038122BC"
"SAVE_FILE_CONFIG": "03818A14",
"WORLD_COLOR_CONFIG": "03818B64",
"add_time": "03818C6E",
"block": "03818C09",
"changed_time": "03818C6D",
"clock_control_button_frames": "03818C6C",
"clock_controls": "03818C72",
"deku_stick_timer_switch": "03818C1C",
"dpad_alt": "03818C0C",
"elegy_timer": "03818C16",
"fps_switch": "03818BD4",
"gDungeonMapLinkHead": "03818A48",
"gExternalEffects": "0381862C",
"gHeapNext": "03818CCC",
"gHudToggle": "03818A58",
"gObjheap": "0381A41C",
"gObjheapItems": "0381A434",
"gParameterAmmoDigit": "03818A98",
"gParameterClock": "03818A88",
"gParameterCounter": "03818AA8",
"gParameterNoteButtons": "03818A78",
"gParameterSunMoon": "03818A68",
"gPlayUpdateInput": "03818F84",
"gSetupDb": "03818B08",
"gShouldForceItemSpawn": "03818C51",
"gSpriteDpad": "03818AF8",
"gSpriteFont": "03818AE8",
"gSpriteIcon": "03818AD8",
"gSpriteIcon24": "03818AC8",
"hour_table": "038189DC",
"hud_counter": "03818C0A",
"hud_hide": "03818C0B",
"last_time": "03818C1A",
"new_time": "03818C70",
"pressed": "03818F50",
"redraw_b_button": "03818C73",
"rupee_drain_frames": "03818C0E",
"rupee_drain_secs": "03818C0D",
"started_timer": "03818C18",
"time_tracker": "03818C10",
"used_block": "03818C08"
}
127 changes: 59 additions & 68 deletions Files/Scripts/Common.psm1
Expand Up @@ -12,8 +12,8 @@ function SetWiiVCMode([boolean]$Enable=!$IsWiiVC) {
if ($RightPanel.Options.Controls.ContainsKey("OptionsPanel")) { ShowRightPanel $RightPanel.Options } else { ShowRightPanel $RightPanel.Settings }
}

ChangeGamesList
ChangePatchList
if ( ($GamePatch.console -eq "Native" -and $WiiVC) -or ($GamePatch.console -eq "Wii VC" -and !$WiiVC) ) { ChangePatch }

SetVCContent
if ( (TestFile $GameFiles.controls) -and $GameSettings -ne $null -and $IsWiiVC) { CreateVCRemapPanel }
SetModeLabel
Expand Down Expand Up @@ -48,12 +48,7 @@ function ChangeConsolesList() {

# Reset
$CurrentGame.Console.Items.Clear()

$Items = @()
foreach ($item in $Files.json.consoles) {
$Items += $item.title
}

$Items = $Files.json.consoles.title
$CurrentGame.Console.Items.AddRange($Items)

# Reset last index
Expand Down Expand Up @@ -92,10 +87,7 @@ function ChangeGamesList() {

$items = @()
foreach ($item in $Files.json.games) {
if ( ($CurrentGame.Console.Text -eq $GameConsole.title) -and ($GameConsole.mode -contains $item.console) ) {
if ( ( $IsWiiVC -and $item.support_vc -eq 1) -or (!$IsWiiVC) ) { $items += $item.title }
}
elseif ($item.console -contains "All") { $items += $item.title }
if ( ($CurrentGame.Console.Text -eq $GameConsole.title -and $GameConsole.mode -contains $item.console) -or $item.console -contains "All") { $items += $item.title }
}

$CurrentGame.Game.Items.AddRange($items)
Expand Down Expand Up @@ -127,16 +119,7 @@ function ChangePatchList() {
# Reset
$Patches.Group.Text = $GameType.mode + " - Patch Options"
$Patches.Type.Items.Clear()

# Set combobox for patches
foreach ($item in $Files.json.patches) {
if (!(CheckIfScriptOrPatchExists -Item $item)) { continue }

if (!(IsSet $item.patch)) { $Patches.Type.Items.Add($item.title) }
else {
if ( ( ($IsWiiVC -and $item.console -eq "Wii VC") -or (!$IsWiiVC -and $item.console -eq "Native") -or ($item.console -eq "Both") -or !(IsSet $item.console) ) ) { $Patches.Type.Items.Add($item.title) }
}
}
$Patches.Type.Items.AddRange(($Files.json.patches.title | Get-Unique))

# Reset last index
foreach ($index in $Patches.Type.Items) {
Expand Down Expand Up @@ -442,53 +425,55 @@ function ChangePatch() {

foreach ($item in $Files.json.patches) {
if ($item.title -eq $Patches.Type.Text -and ( ($IsWiiVC -and $item.console -eq "Wii VC") -or (!$IsWiiVC -and $item.console -eq "Native") -or ($item.console -eq "Both") -or !(IsSet $item.console) ) ) {
$global:GamePatch = $item
$PatchToolTip.SetToolTip($Patches.Button, ([string]::Format($item.tooltip, [Environment]::NewLine)))
GetHeader
GetRegion
if ( ($item.console -eq "Native" -and $IsWiiVC) -or ($item.console -eq "Wii VC" -and !$IsWiiVC) ) { continue }

$global:GamePatch = $item
$PatchToolTip.SetToolTip($Patches.Button, ([string]::Format($item.tooltip, [Environment]::NewLine)))
GetHeader
GetRegion

if ( (IsSet $GamePatch.script) -or (TestFile $GameFiles.controls) ) {
$global:GameSettingsFile = GetGameSettingsFile
$global:GameSettings = GetSettings $GameSettingsFile
}
if ( (IsSet $GamePatch.script) -or (TestFile $GameFiles.controls) ) {
$global:GameSettingsFile = GetGameSettingsFile
$global:GameSettings = GetSettings $GameSettingsFile
}

$CustomHeader.ROMTitle.Refresh()
$CustomHeader.ROMGameID.Refresh()
$CustomHeader.VCTitle.Refresh()
$CustomHeader.VCGameID.Refresh()
$CustomHeader.ROMTitle.Refresh()
$CustomHeader.ROMGameID.Refresh()
$CustomHeader.VCTitle.Refresh()
$CustomHeader.VCGameID.Refresh()

ChangeGameRev
SetGameScript
ChangeGameRev
SetGameScript

# If the patch is a preset disable all options buttons
if (IsSet $GamePatch.preset) {
EnableElem -Elem @($Patches.Extend, $Patches.ExtendLabel, $Patches.Redux, $Patches.ReduxLabel, $Patches.Options, $Patches.OptionsLabel, $Patches.PreviewButton, $Redux.WindowPanel) -Active $False -Hide
foreach ($item in $Redux.Groups) {
if ($item.IsRedux) { EnableElem -Elem $item -Active $True }
}
}
else { # Patches with additional options when available
# Disable boxes if needed
EnableElem -Elem @($Patches.Extend, $Patches.ExtendLabel) -Active (IsSet $GamePatch.allow_extend) -Hide
EnableElem -Elem @($Patches.Redux, $Patches.ReduxLabel) -Active (IsSet $GamePatch.redux) -Hide
EnableElem -Elem @($Patches.Options, $Patches.OptionsLabel) -Active (IsSet $GamePatch.script) -Hide
EnableElem -Elem $Redux.WindowPanel -Active $Patches.Options.Checked
DisableReduxOptions
if (HasCommand "CreateOptionsPreviews") { EnableElem -Elem $Patches.PreviewButton -Active $True -Hide } else { EnableElem -Elem $Patches.PreviewButton -Active $False -Hide }
# If the patch is a preset disable all options buttons
if (IsSet $GamePatch.preset) {
EnableElem -Elem @($Patches.Extend, $Patches.ExtendLabel, $Patches.Redux, $Patches.ReduxLabel, $Patches.Options, $Patches.OptionsLabel, $Patches.PreviewButton, $Redux.WindowPanel) -Active $False -Hide
foreach ($item in $Redux.Groups) {
if ($item.IsRedux) { EnableElem -Elem $item -Active $True }
}
}
else { # Patches with additional options when available
# Disable boxes if needed
EnableElem -Elem @($Patches.Extend, $Patches.ExtendLabel) -Active (IsSet $GamePatch.allow_extend) -Hide
EnableElem -Elem @($Patches.Redux, $Patches.ReduxLabel) -Active (IsSet $GamePatch.redux) -Hide
EnableElem -Elem @($Patches.Options, $Patches.OptionsLabel) -Active (IsSet $GamePatch.script) -Hide
EnableElem -Elem $Redux.WindowPanel -Active $Patches.Options.Checked
DisableReduxOptions
if (HasCommand "CreateOptionsPreviews") { EnableElem -Elem $Patches.PreviewButton -Active $True -Hide } else { EnableElem -Elem $Patches.PreviewButton -Active $False -Hide }
}

# Create VC controls panel
if ($RightPanel.RemapControls.Controls.ContainsKey("RemapVCControlsPanel")) { $RightPanel.RemapControls.Controls.RemoveByKey("RemapVCControlsPanel") }
if ( (TestFile $GameFiles.controls) -and $GameSettings -ne $null) {
$Files.json.controls = SetJSONFile $GameFiles.controls
if ($IsWiiVC) { CreateVCRemapPanel } # Create VC remap settings
}
else {
$Files.json.controls = $null
if ($RightPanel.RemapControls.Visible) { ShowRightPanel $RightPanel.Options }
}
# Create VC controls panel
if ($RightPanel.RemapControls.Controls.ContainsKey("RemapVCControlsPanel")) { $RightPanel.RemapControls.Controls.RemoveByKey("RemapVCControlsPanel") }
if ( (TestFile $GameFiles.controls) -and $GameSettings -ne $null) {
$Files.json.controls = SetJSONFile $GameFiles.controls
if ($IsWiiVC) { CreateVCRemapPanel } # Create VC remap settings
}
else {
$Files.json.controls = $null
if ($RightPanel.RemapControls.Visible) { ShowRightPanel $RightPanel.Options }
}

break
break
}
}

Expand Down Expand Up @@ -599,12 +584,18 @@ function SetModeLabel() {
#==================================================================================================================================================================================================================================================================
function EnablePatchButtons() {

if ($GamePath -eq $null) { $enable = $False }
else { $enable = ($GamePath.Extension -eq ".wad" -and $IsWiiVC) -or ($GamePath.Extension -ne ".wad" -and !$IsWiiVC) }

if ($enable) { UpdateStatusLabel "Ready to patch!" -NoConsole } # Set the status that we are ready to roll... Or not...
elseif ($IsWiiVC) { UpdateStatusLabel "Select your Wii VC WAD file to continue." -NoConsole }
else { UpdateStatusLabel "Select your ROM file to continue." -NoConsole }
if ($GamePath -eq $null) { $enable = $False }
elseif ($GamePatch.console -eq "Native" -and $WiiVC) { $enable = $False }
elseif ($GamePatch.console -eq "Wii VC" -and !$WiiVC) { $enable = $False }
elseif ($GameType.support_vc -eq 0 -and $WiiVC) { $enable = $False }
else { $enable = ($GamePath.Extension -eq ".wad" -and $IsWiiVC) -or ($GamePath.Extension -ne ".wad" -and !$IsWiiVC) }

if ($GameType.support_vc -eq 0 -and $WiiVC) { UpdateStatusLabel "This game does not support Wii VC!" -NoConsole }
elseif ($GamePatch.console -eq "Native" -and $WiiVC) { UpdateStatusLabel "This patch does not support Wii VC!" -NoConsole }
elseif ($GamePatch.console -eq "Wii VC" -and !$WiiVC) { UpdateStatusLabel "This patch only supports Wii VC!" -NoConsole }
elseif ($enable) { UpdateStatusLabel "Ready to patch!" -NoConsole } # Set the status that we are ready to roll... Or not...
elseif ($IsWiiVC) { UpdateStatusLabel "Select your Wii VC WAD file to continue." -NoConsole }
else { UpdateStatusLabel "Select your ROM file to continue." -NoConsole }

$Patches.Button.Enabled = $CustomHeader.Panel.Enabled = $VC.ExtractROMButton.Enabled = $enable # Enable patcher buttons

Expand Down
9 changes: 1 addition & 8 deletions Files/Scripts/Main.psm1
Expand Up @@ -415,14 +415,7 @@ function InitializeEvents() {
# Current Game
$CurrentGame.Console.Add_SelectedIndexChanged({
$Settings["Core"][$this.Name] = $this.SelectedIndex
if ($this.Text -ne $GameConsole.title) {
$switchedWiiVC = $IsWiiVC
ChangeGamesList
if ($switchedWiiVC -ne $IsWiiVC) {
ChangePatchList
ChangeGameMode
}
}
if ($this.Text -ne $GameConsole.title) { ChangeGamesList }
})

$CurrentGame.Game.Add_SelectedIndexChanged({
Expand Down

0 comments on commit cc5d4f2

Please sign in to comment.