mirror of
https://github.com/tangerineturtle1/NX2navi.git
synced 2026-11-18 17:29:57 -04:00
Give the water and floor surfaces' fixed-step remainders as many slots as the waters' ripples.
Every interactive floor of a place and both water managers ask frame_rate_sim_host once an update, each for its own object. With 8 slots, a place with more such objects than that had them take each other's slot in turn, start without a remainder every update and stand still above 60 fps, as before the set owater. The table now has 64 slots, as the ripples' has, and frame_step_check runs 32 surfaces at 144 fps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -277,6 +277,16 @@ int main(int argc, char **argv) {
|
||||
sim(interactive, NAN) == 0, "no time, negative time and NaN are cut as fcvtzs cuts");
|
||||
CHECK(sim(interactive, 1.0f / 15.0f) == 4, "four steps for a 15 fps update (the game's clamp to 3 follows)");
|
||||
}
|
||||
// A place with many interactive floors: 2 water managers and 30 floors, each asking once an update at 144 fps, all
|
||||
// keep their own remainder and run 60 fixed steps a second (with 8 slots they took each other's and ran none).
|
||||
{
|
||||
const uint64_t first = 0x7600000000ull;
|
||||
uint32_t steps[32] = {0};
|
||||
for (int f = 0; f < 1440; f++)
|
||||
for (int k = 0; k < 32; k++) steps[k] += sim(first + 0x1000 * (uint64_t)k, 1.0f / 144.0f);
|
||||
for (int k = 0; k < 32; k++)
|
||||
CHECK(steps[k] >= 599 && steps[k] <= 600, "surface %d of 32 at 144 fps: %u steps in 10 s", k, steps[k]);
|
||||
}
|
||||
printf("frame_step_check: %s\n", fails ? "FAILED" : "ok");
|
||||
return fails != 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user