mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-24 21:55:57 +00:00
Make the Xbox prompts for every game resolution the setup lays the UI out for (#378)
The setup wrote romfs-patches-xbox and romfs-patches-xbox-label for 16:9 only, so prompts = xbox on a 21:9, 32:9, 16:10 or 3:2 screen (the Steam Deck's 1280x800 among them) kept the game resolution at 1920x1080 (cfg.c) or, with output_res set to the screen's shape, fell back to the Switch prompts. #979 fixed this for prompts = pc; this extends the same mechanism to both Xbox folders, the shared-files option of #378 by way of #979's --reuse. - The setup builds romfs-patches-xbox-<w>x<h> and romfs-patches-xbox-label-<w>x<h> for each of ASPECT_SIZES, from their 16:9 folder with --reuse, as it does for romfs-patches-pc-<w>x<h>. - romfs.c overlay_init: at a game resolution of another shape any prompts' folder loads from <folder>-<w>x<h> in place of romfs-patches-<w>x<h>, not only the PC one; without it the Switch prompts stay, and the log names the missing folder and the command that makes it. romfs_shaped_pc_ready becomes romfs_shaped_prompts_ready(folder, w, h). - cfg.c: the display-shaped output_res default applies with prompts = xbox when the folder of the pad layout (romfs-patches-xbox with the Nintendo layout, romfs-patches-xbox-label with any other) is there for that size. - The menu's note for a missing shaped folder reads "off at this game resolution (no layout made for it)" in every menu language, since 16:9 is no longer the only shape with prompts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
1503b17f7d
commit
fb34177cfd
11 files changed
+99
-82
No files matched your search
+2
-2
@@ -275,8 +275,8 @@ def copy_romfs_patches(version, out):
|
||||
menus' captured background turned black). Copies every romfs-patches* folder of build/<version> that has a
|
||||
manifest, the same way when it differs: romfs-patches, romfs-patches-xbox, romfs-patches-xbox-label and
|
||||
romfs-patches-pc (the same with Xbox or keyboard and mouse button prompts, make_romfs_patches.py --prompts) and
|
||||
the ones of another shape, romfs-patches-<w>x<h> and romfs-patches-pc-<w>x<h> (make_romfs_patches.py --aspect),
|
||||
which runtime/romfs.c overlay_init needs for a game resolution that is not 16:9."""
|
||||
the ones of another shape, romfs-patches-<w>x<h> and romfs-patches-<style>-<w>x<h> (make_romfs_patches.py
|
||||
--aspect), which runtime/romfs.c overlay_init needs for a game resolution that is not 16:9."""
|
||||
names = sorted(p.name for p in (ROOT / 'build' / version).glob('romfs-patches*') if p.is_dir())
|
||||
for name in names:
|
||||
src = ROOT / 'build' / version / name
|
||||
|
||||
@@ -38,7 +38,8 @@ from the game's own files on the player's machine, nothing added (tools/button_i
|
||||
every pad not labelled the Nintendo way), so the face buttons keep their letters. The action prompt's diamond is
|
||||
laid out as an Xbox pad's (bflyt_xbox_diamond): A at the bottom, B on the right, X on the left, Y at the top, the
|
||||
button the prompt names lit in its place with its bar.
|
||||
--xbox-prompts is the older name of --prompts xbox.
|
||||
--xbox-prompts is the older name of --prompts xbox. With --aspect, romfs-patches-xbox-<w>x<h> or
|
||||
romfs-patches-xbox-label-<w>x<h>: the same prompts with that shape's UI layout.
|
||||
--prompts pc: keyboard and mouse prompts, for prompts = pc (romfs-patches-pc, or romfs-patches-pc-<w>x<h> with
|
||||
--aspect): every button of the button font is drawn as the key or mouse button the keyboard defaults put on it
|
||||
(button_icons.pc_icons; --binds <totk.ini> takes the first key of its bind_ lines instead), and so are the button
|
||||
@@ -451,8 +452,9 @@ if args.prompts:
|
||||
|
||||
def reusable(path, contents, dictionary):
|
||||
"""The --reuse folder's copy of path when it holds these contents under the same dictionary, else None. The level 19
|
||||
compression is most of a run (about 80 s for the four fonts of 1.4.3), and romfs-patches-pc-<w>x<h> differs from
|
||||
romfs-patches-pc in the Common archive alone, so the setup makes the fifteen shapes from the 16:9 folder."""
|
||||
compression is most of a run (about 80 s for the four fonts of 1.4.3), and romfs-patches-<style>-<w>x<h> differs
|
||||
from romfs-patches-<style> in the Common archive alone, so the setup makes the fifteen shapes from the 16:9
|
||||
folder."""
|
||||
if not args.reuse or not (args.reuse / path).is_file():
|
||||
return None
|
||||
data = (args.reuse / path).read_bytes()
|
||||
|
||||
Reference in new issue
Block a user