Skip to content

Conversation

@itsgrimetime
Copy link
Contributor

@itsgrimetime itsgrimetime commented Dec 30, 2025

Summary

Split from #2024 - focused PR for lb (library) module matches.

Functions matched:

  • lbRefract_80022560 (100%) - texture copy for refraction effects
  • lbRefract_800225D4 (100%) - reset TEV/indirect stages
  • fn_80022608 (100%) - DObj display wrapper with TEV reset
  • fn_80021F34 (81.3%) - texture coordinate calculation callback
  • lbBgFlash_800205F0 (100%) - background flash trigger
  • fn_8002087C (100%) - background flash state initialization
  • lbColl_80009DD4 (100%) - debug quad drawing
  • fn_800263B4 (100%) - audio memory free wrapper

Also includes:

  • Improved struct types for BgFlashState and BgFlashData
  • Updated lbBgFlash_800205F0 signature from void(void) to void(s32)
  • Caller update in gm_17C0.c for signature change

Test plan

  • Build passes with --require-protos
  • CI passes

🤖 Generated with Claude Code

Match the following functions:
- lbRefract_80022560, lbRefract_800225D4, fn_80022608, fn_80021F34
- lbBgFlash_800205F0, fn_8002087C (with improved struct types)
- lbColl_80009DD4 (debug quad drawing)
- fn_800263B4 (lbaudio_ax memory free)

Also updates lbBgFlash_800205F0 signature from void(void) to void(s32)
and updates the caller in gm_17C0.c accordingly.

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

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

decomp-dev bot commented Dec 30, 2025

Report for GALE01 (ae5ac00 - 572bbb5)

📈 Matched code: 47.86% (+0.01%, +320 bytes)

✅ 4 new matches
Unit Item Bytes Before After
main/melee/lb/lbrefract lbRefract_80022560 +116 0.00% 100.00%
main/melee/lb/lbbgflash lbBgFlash_800205F0 +76 0.00% 100.00%
main/melee/lb/lbrefract lbRefract_DObjDispReset +72 0.00% 100.00%
main/melee/lb/lbbgflash lbBgFlash_80021C48 +56 0.00% 100.00%
📈 1 improvement in unmatched functions
Unit Item Bytes Before After
main/melee/lb/lbrefract lbRefract_WriteTexCoordIA4 +31 0.00% 53.33%

itsgrimetime and others added 11 commits December 30, 2025 11:36
- lbRefract: fn_80021F34 → lbRefract_WriteTexCoordIA4
- lbRefract: fn_80022608 → lbRefract_DObjDispReset
- lbBgFlash: fn_8002087C → lbBgFlash_InitState
- lbAudioAx: fn_800263B4 → lbAudioAx_ObjFree

Added @brief documentation and improved parameter names.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Resolve merge conflicts in lbrefract.c (keep new functions)
- Address r-burns feedback: use temporary struct type instead of
  pointer arithmetic on user_data in fn_80021C80

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename parameters and locals to describe their purpose:
- arg0 → data, arg1 → row, arg2 → col
- arg5 → intensity, arg6 → alpha
- t0/t1/t2 → tile_offset/tile_col/base_addr
- ptr → dst

Added @param documentation for each parameter.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Rename struct fields based on usage analysis:
- unk0 → buffer (base address of texture buffer)
- unk1 → format (3=IA4, 4=IA8, 6=RGBA8)
- unk2 → width, unk3 → height
- unk4 → row_stride (bytes per row, 32/64-byte aligned)
- unk5 → buffer_size

Also improve lbRefract_8002219C parameter names and add
documentation for the init function.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add file-level documentation for lbrefract.c/h and lbbgflash.c/h
- Rename fn_80022120 to lbRefract_ReadTexCoordRGBA8
- Add @brief comments to matched functions
- Rename arg0 to duration in lbBgFlash_800205F0

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Update symbols.txt to use proper function names:
- fn_80021F34 -> lbRefract_WriteTexCoordIA4 (81.3% match)
- fn_80022608 -> lbRefract_DObjDispReset (100% match)

These functions were decompiled but the symbol names weren't updated,
causing them to appear as unlinked in the report.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
The function was renamed in the source but the symbol name wasn't
updated, causing a match regression from 62.74% to 0%.

🤖 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 3, 2026 11:37
Address review feedback: replace pointer arithmetic with temporary
struct access patterns in lbBgFlash_80021C48 and lbRefract_WriteTexCoordIA4.

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

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@ribbanya ribbanya enabled auto-merge (squash) January 5, 2026 20:24
@ribbanya ribbanya merged commit df07a55 into doldecomp:master Jan 5, 2026
7 checks passed
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.

3 participants