Triforce v0.9.0

Character tab, faster renderer defaults, HD rumble shipped, and the 11-30 bug pass: ending softlock below 60 fps, adult first-night lock, Intel Arc robust buffers, adult map, randomizer load order.
This commit is contained in:
ruckus7382sfgsgdf
2026-11-30 20:55:14 -06:00
parent 8cb23131f9
commit 822ee913bc
86 changed files with 8128 additions and 438 deletions

View File

@@ -502,15 +502,36 @@ static float text_scale(const char *env, int menu) {
volatile uint64_t hos_step_probe = 0; /* (f_80706be0's object, set by the lifted code when the frame-time hook is in this build; its
+0xd58 is the game clock in 1/60 s: nx2/oot_patches.py) */
volatile uint32_t hos_frame_seconds_bits = 0; /* (the frame's seconds as a float's bits for that hook, 0: the game's own step) */
/* ((Triforce, 11-30) The rate the game steps by now (the graphics module's +0x2c8, realtime_step's), for hos_movie_frames below
60: the rate under 60 (the step 60 / rate), 0 at 60 or when it is not known. Said once in the log when a movie counts by it) */
static int movie_game_rate(void) {
const uint64_t mod = hos_gfx_module;
if (!mod) return 0;
const int rate = __atomic_load_n((const int *)GP(mod + 0x2c8), __ATOMIC_RELAXED);
if (rate < 15 || rate >= 60) return 0;
static volatile LONG said;
if (!InterlockedExchange(&said, 1))
hos_log("video: a movie's count of 60ths below 60 fps: %.3f an update at the game's rate %d (HOS_FPS_MOVIE=0: 1, as shipped)",
60.0 / rate, rate);
return rate;
}
/* A movie's frame count while the frames' time is given (a Frame rate cap above 60): how many 60ths of a second this update of
that movie player is worth, the rest carried to its next one, so the count the cutscene's cues are placed by keeps the clock
as the movie's picture does (issue 1742: the narration ran ahead above 60 fps). 1, the game's own step, otherwise, and with
HOS_FPS_MOVIE=0 (for comparisons). Called by the lifted f_83b7c710 (nx2/oot_patches.py). */
as the movie's picture does (issue 1742: the narration ran ahead above 60 fps). 1, the game's own step, at 60 fps, and with
HOS_FPS_MOVIE=0 (for comparisons). Called by the lifted f_83b7c710 (nx2/oot_patches.py), once a frame.
((Triforce, 11-30) Below 60 fps too, by the game's step (60 / its rate, movie_game_rate): the count grew by 1 a frame, half
the movie's 60ths at 30 fps, while the picture keeps the clock (nn_video.c skips the pictures behind it). The ending's second
staff roll (Dm_StaffCredit_0005, a timeline of 7343 frames on the movie of 7343 pictures) places its UI by that count: "Presented
by Nintendo" in at 3326, out at 3892, the staff roll's end screen opened at 6260. At 30 fps the movie ended with the count near
3672: the text stayed, the end screen was never opened, and Dm_StaffCredit_0007's EventWaitInputTheEndNext waits for input on
that screen, which it never finds: the game stood on the 3D behind the text for good, the "The End" screen never came (5+
players, all of them under 60 fps; the lab: at 30 the same, at 60 the end screen and the title). */
uint32_t hos_movie_frames(uint64_t player) {
enum { PLACES = 16 };
movie_seen(); /* (Triforce: a movie plays, for the frame pacing: pace_handed) */
const uint32_t bits = __atomic_load_n(&hos_frame_seconds_bits, __ATOMIC_RELAXED); /* (realtime_step writes it at each present) */
if (!bits) return 1;
const int rate = bits ? 0 : movie_game_rate(); /* ((Triforce) below 60: the game's step) */
if (!bits && !rate) return 1;
static SRWLOCK lock = SRWLOCK_INIT;
static int timed = -1; /* (these four under the lock) */
static struct { uint64_t player, used; double part; } carry[PLACES];
@@ -538,7 +559,7 @@ uint32_t hos_movie_frames(uint64_t player) {
carry[i].player = player, carry[i].part = x / 4294967296.0;
}
carry[i].used = ++calls;
carry[i].part += (double)secs * 60.0;
carry[i].part += bits ? (double)secs * 60.0 : 60.0 / rate;
n = (uint32_t)carry[i].part;
carry[i].part -= n;
}