Skip to content

battle: type the callback queue slots and name the detached queue - #279

Merged
Xeeynamo merged 1 commit into
Xeeynamo:mainfrom
eduardovra:battle-effect-pool
Oct 8, 2026
Merged

Xeeynamo merged 1 commit into
Xeeynamo:mainfrom
eduardovra:battle-effect-pool

Conversation

@eduardovra

Copy link
Copy Markdown
Contributor

Continuing from #268, this types the slots of the two battle callback queues. Each slot is now a union of the views its callbacks use, so they can read named fields instead of raw offsets. Most of the diff is mechanical renames that follow from that, plus a couple of newly decompiled functions that helped figure out the names.

It also names the second queue, at 0x801621F0. It looks like a sibling of the Effect queue, except there is no code polling its status waiting for it to finish, so my best guess for a name was "Detached", but I'm open to suggestions. One example of that polling is BattleFadeInAfterSummon: it runs on the detached queue itself, and waits for g_BattleEffectCount to reach 0 (every effect callback finished) before fading the party back in.

Type both callback queues' slots as unions of per-consumer views, decompile func_800C494C and func_800C5694, and name BattleEffectUpdate and the screen-fade globals.
@eduardovra
eduardovra marked this pull request as ready for review October 8, 2026 02:35

@Xeeynamo Xeeynamo left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

Very good clean-up

@Xeeynamo
Xeeynamo merged commit 8336aa1 into Xeeynamo:main Oct 8, 2026
1 check passed
@eduardovra
eduardovra deleted the battle-effect-pool branch October 8, 2026 21:19
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