-
-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Add FastChimecho patch * Fix typo * formatting, localization --------- Co-authored-by: Capypara <hello@capypara.de>
- Loading branch information
1 parent
ef70269
commit b068b9d
Showing
8 changed files
with
288 additions
and
0 deletions.
There are no files selected for viewing
93 changes: 93 additions & 0 deletions
93
...le_files/_resources/patches/asm_patches/anonymous_asm_mods/fast_chimecho/common/patch.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
; For use with ARMIPS | ||
; 2024/08/04 | ||
; For Explorers of Sky All Versions | ||
; ------------------------------------------------------------------------------ | ||
; Makes Chimecho Assembly Menu Faster | ||
; ------------------------------------------------------------------------------ | ||
|
||
; Make Leader | ||
.org LD1 | ||
.area 0x4 | ||
mov r3,#0x0 | ||
.endarea | ||
|
||
.org LD2 | ||
.area 0x8 | ||
nop | ||
nop | ||
.endarea | ||
|
||
.org LD3 | ||
.area 0x10 | ||
nop | ||
nop | ||
nop | ||
nop | ||
.endarea | ||
|
||
.org LD4 | ||
.area 0x4 | ||
mov r1,#0xC | ||
.endarea | ||
|
||
; Add to party | ||
.org AP1 | ||
.area 0x4 | ||
mov r3,#0x0 | ||
.endarea | ||
|
||
.org AP2 | ||
.area 0x4 | ||
mov r1,#0xC | ||
.endarea | ||
|
||
|
||
; Remove from party | ||
.org RP1 | ||
.area 0x4 | ||
mov r3,#0x0 | ||
.endarea | ||
|
||
.org RP2 | ||
.area 0x4 | ||
nop | ||
.endarea | ||
|
||
.org RP3 | ||
.area 0xC | ||
nop | ||
nop | ||
nop | ||
.endarea | ||
|
||
.org RP4 | ||
.area 0x8 | ||
nop | ||
nop | ||
.endarea | ||
|
||
.org RP5 | ||
.area 0x10 | ||
nop | ||
nop | ||
nop | ||
nop | ||
.endarea | ||
|
||
.org RP6 | ||
.area 0x4 | ||
mov r1,#0xC | ||
.endarea | ||
|
||
|
||
; Remove permanently | ||
|
||
.org DL1 | ||
.area 0x4 | ||
mov r0,#0xC | ||
.endarea | ||
|
||
.org DL2 | ||
.area 0x4 | ||
moveq r1,#0xC | ||
.endarea |
29 changes: 29 additions & 0 deletions
29
...mple_files/_resources/patches/asm_patches/anonymous_asm_mods/fast_chimecho/eu/offsets.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
; For use with ARMIPS | ||
; 2024/08/04 | ||
; For Explorers of Sky All Versions | ||
; ------------------------------------------------------------------------------ | ||
; Makes Chimecho Assembly Menu Faster | ||
; ------------------------------------------------------------------------------ | ||
|
||
|
||
.relativeinclude on | ||
.nds | ||
.arm | ||
|
||
.definelabel LD1, 0x0238C01C | ||
.definelabel LD2, 0x0238C054 | ||
.definelabel LD3, 0x0238C078 | ||
.definelabel LD4, 0x0238C0A8 | ||
|
||
.definelabel AP1, 0x0238C0C4 | ||
.definelabel AP2, 0x0238C128 | ||
|
||
.definelabel RP1, 0x0238C144 | ||
.definelabel RP2, 0x0238C14C | ||
.definelabel RP3, 0x0238C168 | ||
.definelabel RP4, 0x0238C1CC | ||
.definelabel RP5, 0x0238C1F0 | ||
.definelabel RP6, 0x0238C204 | ||
|
||
.definelabel DL1, 0x0238C2B4 | ||
.definelabel DL2, 0x0238C3A8 |
29 changes: 29 additions & 0 deletions
29
...mple_files/_resources/patches/asm_patches/anonymous_asm_mods/fast_chimecho/jp/offsets.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
; For use with ARMIPS | ||
; 2024/08/04 | ||
; For Explorers of Sky All Versions | ||
; ------------------------------------------------------------------------------ | ||
; Makes Chimecho Assembly Menu Faster | ||
; ------------------------------------------------------------------------------ | ||
|
||
|
||
.relativeinclude on | ||
.nds | ||
.arm | ||
|
||
.definelabel LD1, 0x0238CA3C | ||
.definelabel LD2, 0x0238CA74 | ||
.definelabel LD3, 0x0238CA98 | ||
.definelabel LD4, 0x0238CAC8 | ||
|
||
.definelabel AP1, 0x0238CAE4 | ||
.definelabel AP2, 0x0238CB48 | ||
|
||
.definelabel RP1, 0x0238CB64 | ||
.definelabel RP2, 0x0238CB6C | ||
.definelabel RP3, 0x0238CB88 | ||
.definelabel RP4, 0x0238CBEC | ||
.definelabel RP5, 0x0238CC10 | ||
.definelabel RP6, 0x0238CC24 | ||
|
||
.definelabel DL1, 0x0238CCD4 | ||
.definelabel DL2, 0x0238CDC4 |
29 changes: 29 additions & 0 deletions
29
...mple_files/_resources/patches/asm_patches/anonymous_asm_mods/fast_chimecho/na/offsets.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
; For use with ARMIPS | ||
; 2024/08/04 | ||
; For Explorers of Sky All Versions | ||
; ------------------------------------------------------------------------------ | ||
; Makes Chimecho Assembly Menu Faster | ||
; ------------------------------------------------------------------------------ | ||
|
||
|
||
.relativeinclude on | ||
.nds | ||
.arm | ||
|
||
.definelabel LD1, 0x0238B4DC | ||
.definelabel LD2, 0x0238B514 | ||
.definelabel LD3, 0x0238B538 | ||
.definelabel LD4, 0x0238B568 | ||
|
||
.definelabel AP1, 0x0238B584 | ||
.definelabel AP2, 0x0238B5E8 | ||
|
||
.definelabel RP1, 0x0238B604 | ||
.definelabel RP2, 0x0238B60C | ||
.definelabel RP3, 0x0238B628 | ||
.definelabel RP4, 0x0238B68C | ||
.definelabel RP5, 0x0238B6B0 | ||
.definelabel RP6, 0x0238B6C4 | ||
|
||
.definelabel DL1, 0x0238B774 | ||
.definelabel DL2, 0x0238B868 |
22 changes: 22 additions & 0 deletions
22
...es/_resources/patches/asm_patches/anonymous_asm_mods/fast_chimecho/selector_overlay17.asm
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
; For use with ARMIPS | ||
; 2024/08/04 | ||
; For Explorers of Sky All Versions | ||
; ------------------------------------------------------------------------------ | ||
; Selects the correct version to use | ||
; ------------------------------------------------------------------------------ | ||
|
||
.relativeinclude on | ||
|
||
; Selects the correct region to apply the patch | ||
.if PPMD_GameVer == GameVer_EoS_NA | ||
.include "na/offsets.asm" | ||
.include "common/patch.asm" | ||
.elseif PPMD_GameVer == GameVer_EoS_EU | ||
.include "eu/offsets.asm" | ||
.include "common/patch.asm" | ||
.elseif PPMD_GameVer == GameVer_EoS_JP | ||
.include "jp/offsets.asm" | ||
.include "common/patch.asm" | ||
.endif | ||
|
||
.relativeinclude off |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Copyright 2020-2024 Capypara and the SkyTemple Contributors | ||
# | ||
# This file is part of SkyTemple. | ||
# | ||
# SkyTemple is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
# (at your option) any later version. | ||
# | ||
# SkyTemple is distributed in the hope that it will be useful, | ||
# but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
# GNU General Public License for more details. | ||
# | ||
# You should have received a copy of the GNU General Public License | ||
# along with SkyTemple. If not, see <https://www.gnu.org/licenses/>. | ||
from typing import Callable | ||
|
||
from ndspy.rom import NintendoDSRom | ||
|
||
from skytemple_files.common.util import read_u32 | ||
from skytemple_files.common.ppmdu_config.data import ( | ||
Pmd2Data, | ||
GAME_VERSION_EOS, | ||
GAME_REGION_US, | ||
GAME_REGION_EU, | ||
GAME_REGION_JP, | ||
) | ||
from skytemple_files.patch.category import PatchCategory | ||
from skytemple_files.patch.handler.abstract import AbstractPatchHandler | ||
from skytemple_files.common.i18n_util import _ | ||
|
||
ORIGINAL_INSTRUCTION = 0xE3A03003 | ||
OFFSET_US = 0x139C | ||
OFFSET_EU = 0x139C | ||
OFFSET_JP = 0x139C | ||
|
||
|
||
class FastChimechoPatchHandler(AbstractPatchHandler): | ||
@property | ||
def name(self) -> str: | ||
return "FastChimecho" | ||
|
||
@property | ||
def description(self) -> str: | ||
return _( | ||
"Shorten Chimecho Team Assembly menu interactions. Adding, removing and making leader are now fast interactions that immediately go back to the team member selection menu." | ||
) | ||
|
||
@property | ||
def category(self) -> PatchCategory: | ||
return PatchCategory.IMPROVEMENT_TWEAK | ||
|
||
@property | ||
def author(self) -> str: | ||
return "" | ||
|
||
@property | ||
def version(self) -> str: | ||
return "0.8.6" | ||
|
||
def is_applied(self, rom: NintendoDSRom, config: Pmd2Data) -> bool: | ||
if config.game_version == GAME_VERSION_EOS: | ||
if config.game_region == GAME_REGION_US: | ||
return read_u32(rom.loadArm9Overlays([17])[17].data, OFFSET_US) != ORIGINAL_INSTRUCTION | ||
elif config.game_region == GAME_REGION_EU: | ||
return read_u32(rom.loadArm9Overlays([17])[17].data, OFFSET_EU) != ORIGINAL_INSTRUCTION | ||
elif config.game_region == GAME_REGION_JP: | ||
return read_u32(rom.loadArm9Overlays([17])[17].data, OFFSET_JP) != ORIGINAL_INSTRUCTION | ||
raise NotImplementedError() | ||
|
||
def apply(self, apply: Callable[[], None], rom: NintendoDSRom, config: Pmd2Data) -> None: | ||
# Apply the patch | ||
apply() | ||
|
||
def unapply(self, unapply: Callable[[], None], rom: NintendoDSRom, config: Pmd2Data): | ||
raise NotImplementedError() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters