fix(physics): use predicted magnetic gate bounds
Correct the readable 1000:9b69 reconstruction to read DGROUP 07db/07df and name the helper for its predicted-position role. Rust magnetic rectangles now enter only from an old position inside the record and deactivate when the recomputed prediction exits any edge, replacing the prior swept approximation. Test Plan: - bash original/tools/test_reconstructed_c.sh - python3 original/tools/audit_reconstruction.py --require-complete - cargo test --all-targets - cargo clippy --all-targets --all-features -- -D warnings - rumdl check original/C_RECONSTRUCTION_FINAL_AUDIT.md tdkpin-rs/CHANGELOG.md tdkpin-rs/RECONSTRUCTION.md tdkpin-rs/README.md - git diff --check
This commit is contained in:
@@ -235,9 +235,13 @@ int main(void)
|
||||
assert(tdkpin_receiver_point_in_bounds(
|
||||
0x0100, 0x6000, 0x2000, 0x5000, 0x1300) == 0x1200);
|
||||
|
||||
g_ball_x_milli = 0x1234;
|
||||
g_ball_y_milli = 0x56ab;
|
||||
assert(tdkpin_ball_in_bounds(
|
||||
win16_write_u32(win16_dgroup_pointer(0x07db), 0, 0x00001234u);
|
||||
win16_write_u32(win16_dgroup_pointer(0x07df), 0, 0x000056abu);
|
||||
assert(tdkpin_predicted_ball_in_bounds(
|
||||
0, 0x6000, 0x2000, 0x5000, 0x1000) == 0x5601);
|
||||
g_ball_x_milli = 0;
|
||||
g_ball_y_milli = 0;
|
||||
assert(tdkpin_predicted_ball_in_bounds(
|
||||
0, 0x6000, 0x2000, 0x5000, 0x1000) == 0x5601);
|
||||
|
||||
g_ball_x_milli = 100000;
|
||||
|
||||
@@ -180,7 +180,7 @@ static bool in_bounds(
|
||||
y >= minimum_y && y <= maximum_y;
|
||||
}
|
||||
|
||||
uint16_t tdkpin_ball_in_bounds(
|
||||
uint16_t tdkpin_predicted_ball_in_bounds(
|
||||
uint16_t ignored_static_link,
|
||||
int32_t maximum_y,
|
||||
int32_t maximum_x,
|
||||
|
||||
Reference in New Issue
Block a user