Keep the water's ripples moving above 60 fps by carrying the step's fraction for each water object.

The water renderer runs trunc(step) times the water's substeps of its ripple simulation a frame, which is none while the step is under one frame: the rings stood still above 60 fps. A new site of the set ostep hands the cut to frame_rate_water_host, which adds the step to a remainder kept for the water object and returns the whole steps in it. The waters have a table of 64 slots of their own, as fewer slots than surfaces would have them take each other's in turn.

frame_step_check.py calls the water and day hooks as their sites do. It also gets the three platform stubs it has lacked since the day clock's hook, without which it did not link.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
chrg6
2026-11-12 15:05:53 -05:00
parent cc0b467a2c
commit 6d049c244f
6 changed files with 114 additions and 14 deletions

View File

@@ -32,9 +32,12 @@ uint8_t rt_patch_on[RT_PATCH_COUNT > 0 ? RT_PATCH_COUNT : 1]; // read by the g
#ifdef RT_PATCH_PAGE
#include "debug_tools.h"
__attribute__((constructor)) static void freecam_register(void) { rt_register_host(RT_PATCH_PAGE + 0xf70, dbg_freecam_host); }
// The time of day's site of the set ostep (patches-v111.txt) calls the page's +0xf60 (frame_rate.c).
// The time of day's site of the set ostep (patches-v111.txt) calls the page's +0xf60 and the water renderer's site
// its +0xf50 (frame_rate.c).
__attribute__((constructor)) static void day_register(void) {
if (RT_V111) rt_register_host(RT_PATCH_PAGE + 0xf60, frame_rate_day_host);
if (!RT_V111) return;
rt_register_host(RT_PATCH_PAGE + 0xf60, frame_rate_day_host);
rt_register_host(RT_PATCH_PAGE + 0xf50, frame_rate_water_host);
}
#endif