Skip to content

Decompile rcat + BO6 functions#3206

Closed
shikyo13 wants to merge 25 commits intoXeeynamo:masterfrom
shikyo13:decomp/quick-wins
Closed

Decompile rcat + BO6 functions#3206
shikyo13 wants to merge 25 commits intoXeeynamo:masterfrom
shikyo13:decomp/quick-wins

Conversation

@shikyo13
Copy link
Copy Markdown

Summary

  • Decompile ~25 rcat functions (e_breakable_wall, e_spikes, lava, particles, lighting, entity types)
  • Decompile ~50+ BO6 (Richter boss) functions using src/ric/ as template
  • All SHA1 checksums verified (RCAT.BIN, BO6.BIN)

Details

rcat: Entity decompilations across unk_2FD98.c, unk_31F1C.c, unk_33038.c, e_breakable_wall.c, e_spikes.c, rcat_unused801c28a0.c, unk_3EFD8.c. Removed duplicate Salome functions that upstream moved to e_salome.c in #3147.

BO6: Adapted Richter boss functions from the fully-decompiled src/ric/ overlay. Covers utility functions, state setters, step handlers, subweapon entities, and crash effects.

Test plan

  • RCAT.BIN SHA1 matches: de0a202f1ed432e27202f3f191425ac50c3b0d18
  • BO6.BIN SHA1 matches: fe067af9b7adca08dc99b108129a0f45a7ad45cd
  • make format clean
  • Full make build VERSION=us passes

Note: Draft PR — more functions being added. Also aware of draft PR #2979 from hohle (stale since Nov 2025).

shikyo13 added 25 commits March 27, 2026 08:35
…les, lighting)

Replace 28 INCLUDE_ASM stubs with matching C across rcat overlay:
- e_breakable_wall.c: EntityBreakableWall (shared header pattern)
- e_spikes.c: 6 spike entity functions via shared e_spikes.h
- rcat_unused801c28a0.c: func_us_801C28A0
- unk_2FD98.c: 6 functions including EntityLava
- unk_31F1C.c: 2 complete + 1 NON_MATCHING
- unk_33038.c: 4 particle/effect functions
- unk_3EFD8.c: ~9 functions + 3 NON_MATCHING

Adds ET_801BEFD8 and ET_801C1804 entity types to entity.h.
4 stubs remain in rcat (3 NON_MATCHING close matches + 1 pending).
After rebasing onto upstream (which decompiled Salome in PR Xeeynamo#3147
and renamed FLAG_DRAW_* to ENTITY_*, drawMode to blendMode):

- Remove 5 Salome functions from unk_3EFD8.c (already in e_salome.c)
- Remove orphaned extern declarations for renamed/migrated data
- Fix FLAG_DRAW_OPACITY/SCALEY/SCALEX → ENTITY_* in rcat_unused801c28a0.c
- Remove duplicate ET_801BACF4 typedef and union member from entity.h

RCAT.BIN SHA1 verified: de0a202f1ed432e27202f3f191425ac50c3b0d18
Adapted from fully-decompiled src/ric/ (Richter player overlay):
- BO6_RicSetStep, BO6_RicSetAnimation, BO6_RicSetSpeedX
- DecelerateX, DecelerateY, BO6_RicCheckFacing
- BO6_RicSetStand, BO6_RicSetCrouch, BO6_RicSetFall
- BO6_RicSetSlide, BO6_RicSetSlideKick, BO6_RicSetDeadPrologue
- BO6_RicGetFreeEntity, BO6_RicGetFreeEntityReverse
- BO6_RicCreateEntFactoryFromEntity, BO6_RicSetInvincibilityFrames
- BO6_DisableAfterImage, func_us_801B9ACC, func_us_801B9C14
- func_us_801B9C3C, func_us_801B9D74, func_us_801B9E70

BO6.BIN SHA1 verified: fe067af9b7adca08dc99b108129a0f45a7ad45cd
…us_3E79C.c

Adapted from shared src/rebound_stone.h. SHA1 verified: fe067af9.
Adapted from RIC PrimDecreaseBrightness (src/ric/2F8E8.c). SHA1 verified: fe067af9.
Adapted from RIC DebugShowWaitInfo/DebugInputWait (src/ric/pl_collision.c). SHA1 verified: fe067af9.
Simple 2-step entity: init flags/hitbox, then counter until destroy. SHA1 verified: fe067af9.
Fisher-Yates shuffle, adapted from RIC AguneaShuffleParams (src/ric/319C4.c). SHA1 verified: fe067af9.
Recursive lightning angle calculation, adapted from RIC (src/ric/319C4.c). SHA1 verified: fe067af9.
…3E79C.c

func_us_801C488C: Cross sparkle entity, adapted from RIC func_80169C10.
BO6_GetAguneaLightningAngle: Recursive angle calc, adapted from RIC.
Both verified matching via asm-differ (score 0 effective, blue-only diffs).
func_us_801BC2F0 (RicEntitySlideKick analog)
func_us_801BC3E0 (func_80160D2C analog)
func_us_801BC4F8 (RicEntityBladeDash analog)
func_us_801BC5C8 (func_80160F0C analog)
Adapted from RIC RicEntitySubwpnCrossTrail. BO6 checks parent step 6|7 instead of just 7. Verified matching via asm-differ.
Adapted from RIC RicEntityArmBrandishWhip (src/ric/pl_whip.c).
Uses BO6-specific data tables for whip animation frames. Verified matching via asm-differ.
Decompile the following functions from assembly to matching C:
- func_us_801B5A14 (simple global store)
- BO6_CheckBladeDashInput (simplified blade dash input check)
- BO6_CheckHighJumpInput (simplified high jump input check)
- BO6_RicResetPose (reset pose/timers)
- BO6_RicStepWalk (walk step handler)
- BO6_RicStepRun (run step handler)
- BO6_RicStepFall (fall step handler)
- BO6_RicStepStandInAir (stand in air handler)
- BO6_RicStepEnableFlameWhip (flame whip enable)
- BO6_RicStepHydrostorm (hydrostorm handler)
- BO6_RicStepGenericSubwpnCrash (subweapon crash handler)
- BO6_RicStepThrowDaggers (dagger throw handler)
- BO6_RicStepBladeDash (blade dash handler)
- func_us_801B8E80 (ember/collision effect helper)

All functions verified with 0 yellow lines in asm-differ.
15 INCLUDE_ASM stubs remain (down from 29).
Adapted from RIC overlay's RicEntityCrashReboundStone with BO6-specific
flag (FLAG_UNK_10000000) and g_Ric reference.
Growing diamond primitive effect that tracks Richter's position.
Allocates a GT4 primitive and expands it each frame while fading colors.
@shikyo13 shikyo13 closed this Mar 27, 2026
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