mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 13:05:57 +00:00
Move the aspect words of the patch page to +80..+91 and list the words in use, so other patch sets can take +56..+79.
The shadow cascade range of a pending change loads its four distances from +64..+79 on 1.4.3, where the aspect and the canvas factors were; with both on, the camera would have read a cascade distance as its aspect. recomp/patches.py now lists the words each set uses.
This commit is contained in:
1 parent
89b5126da0
commit
08df794360
4 files changed
+21
-18
No files matched your search
@@ -201,14 +201,14 @@ int res_heapdef_build(const void *in, size_t n, void **out, size_t *out_n) {
|
||||
void res_heapdef_served(void) { R.heapdef_ok = 1; }
|
||||
|
||||
// ---- aspect ratio: an output of another shape than 16:9 gets a camera and a 2D canvas of its shape (the aspect set,
|
||||
// recomp/patches-v121.txt). Page +64 the aspect, +68 and +72 the factors of the canvas width and height: wider than 16:9
|
||||
// recomp/patches-v121.txt). Page +80 the aspect, +84 and +88 the factors of the canvas width and height: wider than 16:9
|
||||
// the canvas grows in x, narrower in y, so the 16:9 layouts keep their proportions and sit in the middle of it.
|
||||
static void aspect_init(uint8_t *page) {
|
||||
int set = rt_patch_set("aspect"); // decide() kept a version without it at 16:9
|
||||
double a = (double)R.ow / R.oh, base = (double)BASE_W / BASE_H;
|
||||
if (fabs(a - base) < ASPECT_EPS || set < 0) return;
|
||||
float v[3] = {(float)a, (float)(a > base ? a / base : 1.0), (float)(a < base ? base / a : 1.0)};
|
||||
memcpy(page + 64, v, sizeof v);
|
||||
memcpy(page + 80, v, sizeof v);
|
||||
rt_patch_switch(set, 1);
|
||||
rt_log("resolution: aspect %.4f (%ux%u): camera and interface canvas follow it (x %.4f, y %.4f)", a, R.ow, R.oh, v[1],
|
||||
v[2]);
|
||||
|
||||
Reference in new issue
Block a user