mirror of
https://github.com/Cesarus85/ringfall-mjolnir-vr.git
synced 2026-10-26 23:00:32 +01:00
I committed in 4410f35e that part (c) of this package was PROVEN IMPOSSIBLE,
on a lab showing that a short-returning function always emits 'mov ax,3' for a
returned constant. That conclusion was wrong because the lab only ever tested
'return <constant>;'.
A board-wide scan settles it: 122 narrow-returning functions in our own build
emit 'mov eax,imm' immediately before ret, including _actor_visibility_at_point
in this very object, which is EXACT. The corrected law, stated as the verifier
required rather than as the decoding agent first wrote it:
In a narrow-returning function, 'return <constant>;' materialises the constant
at RETURN-SLOT width (mov ax,K), while a constant assigned to a single-exit
accumulator materialises it at REGISTER width (mov eax,K). The accumulator's
own width is INERT - short and long accumulators both reach 38/6. It is the
declared RETURN TYPE that flips callers to cleanup-first; the body rewrite
alone buys nothing.
So January's 'mov eax,3' never meant a wide return type. It meant the single-exit
idiom this campaign already knows January uses, and which this file uses nine
times over.
actor_get_perception_knowledge becomes short in both definition and declaration,
with its body rewritten to the file's own goto done idiom. All three functions
are now EXACT: the callee holds at 240, _actor_perception_update banks 4,720 and
_prop_status_refresh banks 3,680.
The third file is why this is not the two-file change that was proposed. The
landing also improves a PARKED function's bytes - ai_communication's
_ai_communication_actor_talk_weight goes 99.31293 to 99.993195 percent - which
stales its recorded evidence and fails ninja's PROGRESS gate outright. Its
measurements are refreshed and the two sentences this landing falsifies are
rewritten: the entry asserted that the long return type was definition-correct
and that a narrow declaration contradicted the owner definition, and both are
now untrue. The function is still not exact, so it stays parked, and its
residual is down to a single real region. parked.json was edited by line
surgery, never re-serialized.
Verified: full ninja green, halobetacache 1,458,814 / 1,770,166 (7,300 / 7,574),
all 11 lane units gated per row, exactly two rows gained and none lost.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
46 lines
1.0 KiB
C
46 lines
1.0 KiB
C
/*
|
|
ACTOR_PERCEPTION.H
|
|
|
|
header included in hcex build.
|
|
*/
|
|
|
|
#ifndef __ACTOR_PERCEPTION_H
|
|
#define __ACTOR_PERCEPTION_H
|
|
#pragma once
|
|
|
|
/* ---------- prototypes/ACTOR_PERCEPTION.C */
|
|
|
|
struct actor_position_data;
|
|
union real_point3d;
|
|
|
|
short actor_get_perception_knowledge(
|
|
long actor_index,
|
|
long prop_index);
|
|
short actor_visibility_at_point(
|
|
long actor_index,
|
|
struct actor_position_data const *position,
|
|
union real_point3d const *target_position,
|
|
char lighting,
|
|
short line_of_sight,
|
|
boolean use_maximum_distance,
|
|
boolean target_is_player,
|
|
short perception_knowledge);
|
|
|
|
void actor_situation_update_target_status(
|
|
long actor_index);
|
|
void actor_situation_combat_status_update(
|
|
long actor_index);
|
|
boolean actor_situation_try_new_target(
|
|
long actor_index,
|
|
long prop_index);
|
|
boolean actor_perception_friend_prop_is_attacking(
|
|
long actor_index,
|
|
long friend_prop_index,
|
|
real_vector3d *attack_vector);
|
|
void actor_perception_unreachable(
|
|
long actor_index,
|
|
long prop_index,
|
|
boolean unreachable);
|
|
|
|
#endif // __ACTOR_PERCEPTION_H
|