mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 13:05:57 +00:00
Make the PC prompts for every game resolution the setup lays the UI out for
The setup wrote romfs-patches-pc for 16:9 only, so prompts = pc on a 21:9, 32:9, 16:10 or 3:2 screen kept the game resolution at 1920x1080 (cfg.c) or, with output_res set to the screen's shape, fell back to the Switch prompts. - make_romfs_patches.py --reuse <folder>: a file of an earlier overlay whose contents match is hard-linked (copied where links fail) instead of compressed again; the output is byte for byte the same. - The setup builds romfs-patches-pc-<w>x<h> for each of ASPECT_SIZES from romfs-patches-pc with --reuse: only the Common archive is compressed, so the fifteen folders take about two minutes and 6 MiB each instead of 22 minutes and 73 MiB each. - cfg.c: the display-shaped output_res default applies with prompts = pc when romfs-patches-pc-<w>x<h> is there (romfs_shaped_pc_ready); Xbox prompts keep 1920x1080 as before.
This commit is contained in:
1 parent
ae30a61b7b
commit
ceece5683a
10 files changed
+125
-26
No files matched your search
+20
-2
@@ -8,7 +8,7 @@ with the bundled clang (hostcheck.c).
|
||||
|
||||
Install folder: exefs/, romfs/ (romfs.bin, index.json), profile/, shared-fonts/ (Chinese and Korean text), totk.exe
|
||||
and its DLLs, nvngx_dlss.dll (with --dlss), romfs-index.bin, romfs-patches/, romfs-patches-xbox/,
|
||||
romfs-patches-xbox-label/, romfs-patches-pc/, totk_xlate.exe, the
|
||||
romfs-patches-xbox-label/, romfs-patches-pc/, romfs-patches-pc-<w>x<h>/, totk_xlate.exe, the
|
||||
shader state of totk.exe --prepare-shaders, totk.ini, totk-install.json.
|
||||
Temp folder (<temp>/<dest name>-<hash>): check/ (ExeFS of both inputs, the host check), unpacked/ (the NSP of an NSZ
|
||||
or XCZ input until the extraction is done), gen/ (C), build/ (objects), logs/. The cleanup keeps gen/, build/ and
|
||||
@@ -1097,7 +1097,7 @@ class Prepare(Step):
|
||||
# input_prompts_folder). Both are written on every install, so the menu choices work without another run of
|
||||
# the setup. Optional: when one fails, the game keeps the Switch prompts with that layout and the menu says the
|
||||
# files are missing, so the setup warns once and goes on. romfs-patches-pc likewise, with keyboard and mouse
|
||||
# prompts for prompts = pc (16:9 only: another shape takes make_romfs_patches.py --prompts pc --aspect).
|
||||
# prompts for prompts = pc.
|
||||
failed = None
|
||||
for style in ('xbox', 'xbox-label', 'pc'):
|
||||
out = dest / f'romfs-patches-{style}'
|
||||
@@ -1108,6 +1108,24 @@ class Prepare(Step):
|
||||
if code:
|
||||
remove(out)
|
||||
failed = failed or (code, log)
|
||||
# The PC prompts once more for each shape of ASPECT_SIZES, romfs-patches-pc-<w>x<h> with that shape's UI layout
|
||||
# (--prompts pc --aspect), which runtime/romfs.c overlay_init loads in place of romfs-patches-<w>x<h>: without
|
||||
# it a player with prompts = pc on a screen that is not 16:9 chose between the prompts and the screen's shape.
|
||||
# Only the Common archive differs from romfs-patches-pc; --reuse links the fonts, messages and size table from
|
||||
# there instead of compressing them again, so the fifteen folders take seconds and a few MiB each. Optional
|
||||
# like romfs-patches-pc, and skipped without it.
|
||||
pc = dest / 'romfs-patches-pc'
|
||||
for size in ASPECT_SIZES:
|
||||
out = dest / f'romfs-patches-pc-{size}'
|
||||
remove(out)
|
||||
if not (pc / 'manifest.tsv').is_file():
|
||||
continue
|
||||
code, log = run_tool(ctx, f'prepare-pc-{size}', layout.tools / 'make_romfs_patches.py',
|
||||
['--version', version_tag(game_version(ctx)), '--romfs', dest / 'romfs', '--out', out,
|
||||
'--prompts', 'pc', '--aspect', size, '--reuse', pc])
|
||||
if code:
|
||||
remove(out)
|
||||
failed = failed or (code, log)
|
||||
if failed:
|
||||
rep.warning('warn.xbox_prompts_failed', code=failed[0], log=str(failed[1]))
|
||||
|
||||
|
||||
Reference in new issue
Block a user