Skip to content

Conversation

@itsgrimetime
Copy link
Contributor

@itsgrimetime itsgrimetime commented Dec 30, 2025

Summary

  • Renames Fighter_804D6500 to gCrowdConfig - this struct configures crowd/announcer SFX reactions, not fighter data
  • Defines CrowdConfig struct with documented field names based on code analysis and runtime validation
  • Updates vi1202.c to use named struct fields instead of M2C_FIELD offsets

Evidence for "Crowd" naming

  • Symbol names from UnclePunch's Training Mode map (Feb 2019): CrowdSFXManager_* functions at 0x80321900+
  • Audio function lbAudio_PlayCrowdSFX at 0x8002411C
  • Validated via debugger

Field documentation

Offset Field Purpose
0x00-0x08 kb_threshold_low/mid/high Knockback thresholds for gasp intensity (100/130/160)
0x0C-0x14 angle_min/max/mult Angle range and multiplier for reaction modifier
0x20 cheer_limit Cheer timing limit
0x28 max_gasp_count Maximum concurrent gasps
0x2C horiz_margin Horizontal margin from blast zone
0x30-0x38 recovery_y_high/mid/low Y-position thresholds for recovery gasps (-10/-30/-80)
0x3C fighters_near_blastzone Fighter count threshold for proximity gasp
0x40 blastzone_y_offset Y-offset for blast zone proximity check

Threshold values validated via Dolphin debugger & memory inspection.

@decomp-dev
Copy link

decomp-dev bot commented Dec 30, 2025

Report for GALE01 (ae5ac00 - fcf9a55)

No changes

itsgrimetime added a commit to itsgrimetime/melee that referenced this pull request Jan 1, 2026
- Add vi1202_ViData struct for Fighter_804D6500 access
- Replace raw pointer arithmetic with struct field access
- Clean up un_80321950 and un_80321C70 to use struct types
- Use named struct for vi1202_UnkStruct (forward declaration support)

Addresses review feedback from PR doldecomp#2053.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@itsgrimetime itsgrimetime force-pushed the vi-functions-1 branch 3 times, most recently from f835e22 to b9e272a Compare January 3, 2026 09:28
@itsgrimetime itsgrimetime requested a review from ribbanya January 3, 2026 09:35
itsgrimetime and others added 4 commits January 3, 2026 12:15
Fighter_804D6500 is not a Fighter - it's vi/cutscene related global
data. Add proper struct type and replace M2C_FIELD macro calls with
struct field access for better readability.

- Add vi1202_ViData struct documenting fields at offsets 0x0-0x40
- Replace M2C_FIELD(Fighter_804D6500, ...) with struct access
- Rename local 'fighter' variables to 'vdata' to reflect actual type
- All function matches maintained at original levels

Addresses PR review feedback about using proper struct types.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Move vi1202_ViData struct and Fighter_804D6500 extern to vi1202.h
- Remove declaration from fighter.h and update definition in fighter.c
- Replace all casts with direct struct field access

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename the global config pointer and struct to reflect its actual
purpose - configuring crowd/announcer reactions during matches.

Evidence for "Crowd" naming:
- Symbol names from UnclePunch's Training Mode map (Feb 2019)
- Functions at 0x80321900+ named CrowdSFXManager_* in that map
- Audio function 0x8002411C named lbAudio_PlayCrowdSFX
- Code behavior matches wiki descriptions of crowd gasps/cheers

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add descriptive field names to CrowdConfig based on code analysis
  and runtime validation via Dolphin debugger:
  - kb_threshold_low/mid/high (100/130/160): knockback thresholds
  - recovery_y_high/mid/low (-10/-30/-80): recovery gasp Y thresholds
  - horiz_margin, blastzone_y_offset, fighters_near_blastzone, etc.
- Restore missing functions un_80321294 and un_803224DC
- Add required includes (baselib/aobj.h, baselib/cobj.h)
- Fix un_80321294 declaration in header

Field naming verified by setting breakpoints on:
- 0x803224DC (Crowd_CheckForCrowdGaspUponHittingGround)
- 0x80322598 (Crowd_CheckForCrowdGaspOnRecovery)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@itsgrimetime itsgrimetime changed the title vi: Match vi1202 cutscene functions (part 1) vi: documenting gCrowdConfig Jan 3, 2026
@itsgrimetime itsgrimetime changed the title vi: documenting gCrowdConfig vi: Define CrowdConfig struct and rename Fighter_804D6500 Jan 3, 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.

2 participants