Skip to content

Restore dead-body fades and Frigate water - #118

Open
mrfox-1 wants to merge 1 commit into
SunJaycy:mainfrom
mrfox-1:agent/fix-frigate-water-body-fade
Open

Restore dead-body fades and Frigate water#118
mrfox-1 wants to merge 1 commit into
SunJaycy:mainfrom
mrfox-1:agent/fix-frigate-water-body-fade

Conversation

@mrfox-1

@mrfox-1 mrfox-1 commented Aug 4, 2026

Copy link
Copy Markdown

Summary

Restores two XBLA/Community Edition rendering behaviors that are currently
broken in the Windows recomp:

  • dead enemies remain visible and use the original delayed fade instead of
    disappearing immediately;
  • Frigate renders its animated water in the enhanced-graphics path, including
    from the low speedboat camera, without the near-water gap.

Dead-body fade

The recompilation of sub_821898D0 caches the display width and height at
sp+120 and sp+112, then runs a long graphics-initializer chain before
consuming them. In the recompiled path those stack slots are clobbered to 0
and -1.

The XDK texture-header builder encodes that pair as 8192x8191 sentinel
textures. Their 4 KiB color/depth allocations overlap, which breaks the
stencil-based corpse-fade composite. The hook at 0x821899E4 reloads the same
canonical width/height globals immediately before sub_82099B40 consumes
r3/r4.

Frigate water

This ports the relevant Community Edition instruction behavior into mid-ASM
hooks:

  • 0x8209ECF4: skip the HD-graphics flag reload that suppresses the Frigate
    water draw;
  • 0x8210E0DC: pin the projection builder's live near-clip argument to 2.0,
    matching the existing CE near-clip patch and preventing low-camera clipping.

The executable uses the Frigate skydome already present in the user's adjacent
assets folder. No game asset or generated recompilation output is included or
modified by this PR.

Validation

Tested in the Windows x64 1.2.4 community build:

  • bodies remain after death and then use the original delayed fade;
  • the visible color change during transparency was checked frame-by-frame
    against the Xenia reference and is the expected background composite;
  • Frigate water is animated and textured beside the speedboat, from the lower
    deck, and at the horizon;
  • repeated level loads were exercised;
  • the optimized release executable was smoke-tested with SunJaycy's stock
    1.2.4 runtime DLLs.

The final community build is published as
v2.2.0.
Related reports:
community issue #3
and
community issue #4.

@mrfox-1
mrfox-1 marked this pull request as ready for review August 4, 2026 10:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant