-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Widescreen HUD Hack Patch for Echoes #108
Open
Nystrata
wants to merge
36
commits into
randovania:main
Choose a base branch
from
Nystrata:WidescreenHUDPatch
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
4d778fb
WidescreenHUD Patch
Nystrata f7c4210
Renamed FRME files to match names in PWE
Nystrata 47dcc7f
Summary (Required)
Nystrata 74e913e
Update dol_patches.py
Nystrata 5b77a25
Update dol_patches.py
Nystrata 1b5a9eb
Summary (required)
Nystrata 7e8cf3e
Summary (required)
Nystrata 3ba54eb
Merge branch 'main' into WidescreenHUDPatch
Nystrata 336a29d
Seperate out apply_widescreen_hack_patch into it's own function
Nystrata 2e60b8e
Remove prints from widescreen_hud\__init__
Nystrata dc07441
Clean up
Nystrata 9a37e80
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 892cf34
Make configurable via EchoesDolPatchesData
Nystrata c195eeb
Merge branch 'WidescreenHUDPatch' of https://github.com/Nystrata/open…
Nystrata cf03ff1
Add docstrings, pass version.description instead of the entire versio…
Nystrata 55320f8
Restore vanila instructions when widescreen hack is disabled
Nystrata 1ae075a
Merge branch 'randovania:main' into WidescreenHUDPatch
Nystrata 432fc18
Merge branch 'main' into WidescreenHUDPatch
Nystrata a5544d5
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9b3ad55
Merge branch 'randovania:main' into WidescreenHUDPatch
Nystrata f531082
Merge branch 'randovania:main' into WidescreenHUDPatch
Nystrata 1a1af32
Update __init__.py - Fixed comment typo
Nystrata 807463b
Move addresses to dol_versions.py
Nystrata ac0461b
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 9a15c3d
Fixed variable typos
Nystrata 27a8e76
Add comment explaining manual version detection
Nystrata a7be495
Comment typo fix
Nystrata 6dfe945
Check if asset exists, instead of needing to deal with game versions
Nystrata eaa0d5d
Merge branch 'randovania:main' into WidescreenHUDPatch
Nystrata fb4896b
Merge branch 'randovania:main' into WidescreenHUDPatch
Nystrata 20dc608
Update __init__.py
Nystrata 0ec11ad
Rename variables to be more accurate, added comments
Nystrata 377549c
Replace culling section with a simple float value change, updated com…
Nystrata 579ae9f
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] 7e91bd9
Remove usage of storing to r2
Nystrata bda18b6
Rework culling code, rename variables for clarity
Nystrata File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
Binary file added
BIN
+31.7 KB
src/open_prime_rando/echoes/custom_assets/widescreen_hud/FRME_Helmet.FRME
Binary file not shown.
Binary file added
BIN
+38.9 KB
src/open_prime_rando/echoes/custom_assets/widescreen_hud/FRME_SamusHud1Ball.FRME
Binary file not shown.
Binary file added
BIN
+69.3 KB
src/open_prime_rando/echoes/custom_assets/widescreen_hud/FRME_SamusHud1Combat.FRME
Binary file not shown.
Binary file added
BIN
+69.5 KB
src/open_prime_rando/echoes/custom_assets/widescreen_hud/FRME_SamusHud1Combat_0.FRME
Binary file not shown.
Binary file added
BIN
+30.5 KB
src/open_prime_rando/echoes/custom_assets/widescreen_hud/FRME_ScanHudFlat_0.FRME
Binary file not shown.
Binary file added
BIN
+32.2 KB
src/open_prime_rando/echoes/custom_assets/widescreen_hud/FRME_ScanHudFlat_1.FRME
Binary file not shown.
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,18 @@ | ||
from retro_data_structures.base_resource import RawResource | ||
|
||
from open_prime_rando.echoes.custom_assets import custom_asset_path | ||
from open_prime_rando.echoes.widescreen_hud.asset_map import WIDESCREEN_HUD_ASSETS | ||
from open_prime_rando.patcher_editor import PatcherEditor | ||
|
||
|
||
def apply_widescreen_hud(editor: PatcherEditor): | ||
""" | ||
Replaces certain FRME files to adjust HUD/Visor widgets to better fit a 16:9 screen aspect ratio | ||
""" | ||
widescreen_assets = custom_asset_path().joinpath("widescreen_hud") | ||
for asset_id, filename in WIDESCREEN_HUD_ASSETS.items(): | ||
asset = widescreen_assets.joinpath(filename) | ||
if not editor.does_asset_exists(asset_id): | ||
continue | ||
res = RawResource(type="FRME", data=asset.read_bytes()) | ||
editor.replace_asset(asset_id, res) |
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,14 @@ | ||
# https://github.com/Nystrata/EchoesWidescreenHUD/wiki#gguisyspak | ||
from retro_data_structures.base_resource import AssetId | ||
|
||
WIDESCREEN_HUD_ASSETS: dict[AssetId, str] = { | ||
# Common | ||
0xE6F37215: "FRME_Helmet.FRME", | ||
0x88738D60: "FRME_SamusHud1Ball.FRME", | ||
# NTSC-U | ||
0xEEF43AA1: "FRME_SamusHud1Combat.FRME", | ||
0xF7EC0850: "FRME_ScanHudFlat_0.FRME", | ||
# PAL | ||
0xB5CF0C19: "FRME_SamusHud1Combat_0.FRME", | ||
0xD9D58FA5: "FRME_ScanHudFlat_1.FRME", | ||
} |
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
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
r2 is already tracked via the
sda2_base
variable, meaning you could have these two offsets be just addresses and do the math in runtime.Also remove the suffix
_address
from all attributes because everything is an address.