Files
astromaddie--HaloCE-VR/source/rasterizer/rasterizer_geometry.h
T
Jonas VolmanandClaude Opus 5.5 70e1a15b69 Return uncompressed vectors by value and match reload/index-buffer code
Structural lane batch 6: +1,632 padded / +1,590 meaningful bytes strict
exact (4 functions), zero stable-verdict regressions across the full
board (the header consumer sweep).

- rasterizer_geometry.h/.c: uncompress_int32_to_real_vector3d returns
  real_vector3d by value. The debug build shows the struct-return copy
  at all 16 call sites, and HCEX lists a single parameter. Callers in
  rasterizer.c, rasterizer_lights.c and rasterizer_xbox_lights.c assign
  the result directly and drop their scratch buffers. Exact:
  _compress_real_vector3d_to_int32 and _clamp. The parked
  _rasterizer_sun_glow_draw is re-measured (same size, fuzzy
  95.815 -> 95.817).
- game/players.h: declare players_debug_render(void), a public players.c
  function that render_debug.c called undeclared (C4013). Disclosure: the
  by-value prototype drops one declared name, which alone flips
  _rasterizer_frame_statistics_draw's field-load order. This genuine
  missing prototype restores that TU's name count. Both edits are
  independently evidenced and landed together; the full build shows no
  regression.
- weapons.c: _weapon_magazine_finish_reload reads magazine->rounds_loaded
  (/Od 0x6a4590).
- rasterizer_xbox_hardware_geometry.c: _rasterizer_triangle_buffer_new
  follows the debug build (0x7eaca0), including the index-buffer Unlock
  with its HRESULT check. This removes the _ReadWriteBarrier/pragma/goto
  steering.
- parked.json: unpark the three newly exact parked functions.

Gate: ninja PASS, parks 109/0/0, admission 0 contradicted/0 revoked,
provider link PASS, casts and fake scan unchanged, pytest 1152 passed /
5 skipped / 26 subtests.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-23 06:36:08 -07:00

97 lines
1.9 KiB
C

/*
RASTERIZER_GEOMETRY.H
header included in hcex build.
*/
#ifndef __RASTERIZER_GEOMETRY_H
#define __RASTERIZER_GEOMETRY_H
#pragma once
/* ---------- constants */
enum
{
_rasterizer_vertex_type_environment_uncompressed = 0,
_rasterizer_vertex_type_environment_compressed,
_rasterizer_vertex_type_environment_lightmap_uncompressed,
_rasterizer_vertex_type_environment_lightmap_compressed,
_rasterizer_vertex_type_model_uncompressed,
_rasterizer_vertex_type_model_compressed,
_rasterizer_vertex_type_dynamic_unlit,
_rasterizer_vertex_type_dynamic_lit,
_rasterizer_vertex_type_dynamic_screen,
_rasterizer_vertex_type_debug,
_rasterizer_vertex_type_decal,
_rasterizer_vertex_type_detail_object,
NUMBER_OF_RASTERIZER_VERTEX_TYPES,
};
/* ---------- macros */
/* ---------- structures */
union real_vector3d;
struct vertex_buffer
{
short type;
word pad;
long count;
long offset;
void *base_address;
void *hardware_format;
};
enum
{
_triangle_buffer_type_triangles,
_triangle_buffer_type_precompiled_strip,
NUMBER_OF_TRIANGLE_BUFFER_TYPES,
};
struct triangle_buffer
{
short type;
word pad;
long count;
void *base_address;
void *hardware_format;
};
/* ---------- prototypes/RASTERIZER_GEOMETRY.C */
union real_vector3d uncompress_int32_to_real_vector3d(
unsigned long compressed);
byte compress_real_to_int8(
real value);
unsigned long compress_real_vector3d_to_int32_clamp(
union real_vector3d const *vector);
long rasterizer_geometry_get_vertex_size(
short type);
void rasterizer_geometry_uncompress_vertices(
short type,
long count,
void *uncompressed,
long uncompressed_size,
void *compressed,
long compressed_size);
void rasterizer_geometry_compress_vertices(
short type,
long count,
void *compressed,
long compressed_size,
void *uncompressed,
long uncompressed_size);
/* ---------- globals */
/* ---------- public code */
#endif // __RASTERIZER_GEOMETRY_H