Skip to content

magic: import and decompile tornado, whirl - #325

Draft
j3lee wants to merge 3 commits into
Xeeynamo:mainfrom
j3lee:spells-tornado
Draft

j3lee wants to merge 3 commits into
Xeeynamo:mainfrom
j3lee:spells-tornado

Conversation

@j3lee

@j3lee j3lee commented Oct 12, 2026

Copy link
Copy Markdown
Contributor

Two overlays built from the same code, imported and fully decompiled (24 functions, no assembly left). One commit per overlay, then the scratchpad clean-up.

  • tornado is the Tornado spell; whirl is shared by Tornade Wave and Dragon Dance
  • each has two 100-entry particle pools (sprites and ribbons) with an alloc and a tick per pool
  • the files differ in a ribbon colour initialiser and in one view test that whirl does not have
  • both keep decay = 100 in a local with a // match: comment: the constant has to sit in a local for the step to compile the same

Scratchpad access uses getScratchAddr. Each file opens with the attack it belongs to, in the form the other magic files use; an effect several attacks share lists them. Functions are named <Overlay><Thing><Verb> after what they draw or do; data keeps its D_ names. No shared header is changed.

j3lee added 3 commits October 12, 2026 13:17
All 12 functions. The 100 in the unk4 step must sit in a local (decay) for the match; no stack pad or mask needed.
All 12 functions, a code twin of tornado. Match notes: u32 col = 0x3A000000 must be the first local initialiser of WhirlRibbonParticleTick (tornado needs it assigned after the declarations); the 100 in the unk4 step must sit in a local (decay).
…whirl

Also adds the reading to the tornado header. Same instructions: 31 OK.
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