Skip to content

Conversation

@itsgrimetime
Copy link
Contributor

Summary

  • Match Camera_8002E6FC
  • Match Camera_8002E948
  • Match Camera_8002EB5C
  • Match Camera_8002EC7C
  • Match Camera_8002ED9C (100%)
  • Match Camera_8002F274 (100%)
  • Match Camera_8002E818 (100%)
  • Match Camera_8002B0E0 (100%)
  • Match Camera_8002F9E4 (85.4%)
  • Improve Camera_8002FC7C (71.8% → 98.2%)

10 commits covering camera system functions.

Test plan

  • Builds successfully
  • clang-format passes

🤖 Generated with Claude Code

@decomp-dev
Copy link

decomp-dev bot commented Dec 30, 2025

Report for GALE01 (ae5ac00 - 9579979)

📈 Matched code: 47.91% (+0.05%, +1984 bytes)

✅ 7 new matches
Unit Item Bytes Before After
main/melee/cm/camera Camera_8002E818 +304 0.00% 100.00%
main/melee/cm/camera Camera_8002ED9C +300 0.00% 100.00%
main/melee/cm/camera Camera_8002EB5C +288 0.00% 100.00%
main/melee/cm/camera Camera_8002EC7C +288 0.00% 100.00%
main/melee/cm/camera Camera_8002E6FC +284 0.00% 100.00%
main/melee/cm/camera Camera_8002E948 +284 0.00% 100.00%
main/melee/cm/camera Camera_8002F274 +236 0.00% 100.00%
📈 3 improvements in unmatched functions
Unit Item Bytes Before After
main/melee/cm/camera Camera_8002F9E4 +281 0.00% 63.45%
main/melee/cm/camera Camera_8002FC7C +119 71.83% 98.53%
main/melee/cm/camera Camera_8002B0E0 0 87.64% 87.71%

Match the following camera functions:
- Camera_8002E6FC (100%) - Sets camera target interest based on bitfield mode
- Camera_8002E818 (100%) - Sets x341_b1_b2 = 2 and copies pos to pad_342[2]
- Camera_8002E948 (100%) - Sets camera target interest from callback (mode 3)
- Camera_8002EB5C (100%) - Sets camera target position from FOV with bitfield mode
- Camera_8002EC7C (100%) - Similar to 8002EB5C but stores fov to 0x364
- Camera_8002ED9C (100%) - Takes float, converts to s16 and stores at 0x35E
- Camera_8002F274 (100%) - Sets x341_b3_b4 = 1, copies transform.position to x35C.vec
- Camera_8002B0E0 (100%) - Camera transform initialization
- Camera_8002F9E4 (85.4%) - Pause mode camera initialization
- Camera_8002FC7C (98.2%) - Camera state reset

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
itsgrimetime and others added 2 commits January 2, 2026 19:59
Address review feedback by moving the X35C_Bits struct from a
file-local typedef with macro cast into the Camera struct's x35C
union as an inline struct member.

Also fix header signature mismatches for Camera_800293E0,
Camera_800300F0, Camera_80030688, Camera_80030DF8, Camera_800310E8.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Copy link
Collaborator

@sadkellz sadkellz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left some more feedback that I missed the first pass.

- Convert pad_342 to x342_pad[2] + x344 union (s32/Vec3/cb)
- Extend x35C union bits struct with s16 x2 at offset 2
- Replace pointer arithmetic with proper struct field access
- Rename speculative parameter names to generic arg0/arg1:
  - Camera_8002EB5C, Camera_8002EC7C, Camera_8002ED9C
  - Camera_8002F9E4

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Comment on lines +143 to +145
u8 : 5;
u8 pad;
s16 x2;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These seem a little weird to define like this, but I'm actually not sure what the preferred way to do this would be. Maybe @ribbanya or @r-burns would know.

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