Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ CODE_OVERLAYS := field_init intro field \
tripletriad battle_render battle world

ALL_EFFECT_OVERLAYS := $(filter effect_%,$(SPLAT_BINARIES))
EFFECTS ?= effect_001 effect_025 effect_028
EFFECTS ?= effect_001 effect_025 effect_028 effect_052
EFFECT_OVERLAYS := $(if $(filter all,$(EFFECTS)),$(ALL_EFFECT_OVERLAYS),$(EFFECTS))
OVERLAYS := $(MENU_OVERLAYS) $(CODE_OVERLAYS) $(EFFECT_OVERLAYS)
ALL_OVERLAYS := $(MENU_OVERLAYS) $(CODE_OVERLAYS) $(ALL_EFFECT_OVERLAYS)
Expand Down
32 changes: 29 additions & 3 deletions config/ff8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1496,15 +1496,41 @@ binaries:
options:
target_path: original/effect/effect_052.bin
src_path: src/effect
section_order: [.text, .rodata, .data, .bss]
segments:
- name: effect_052
type: code
start: 0x0
vram: 0x801A0000
subsegments:
- [0x0, c, effect_052]
- [0x9BDC, .rodata, effect_052]
- [0x9BF0, bin, effect_052]
- [0x0, c, effect_052_entry]
- [0x1EC, c, lib/common]
- [0x95C, c, lib/rotz]
- [0xAE8, c, lib/heading]
- [0xB18, c, lib/entity]
- [0x1688, c, lib/tint]
- [0x1964, c, lib/vector]
- [0x20D0, c, lib/emit]
- [0x3F04, c, lib/packet]
- [0x410C, c, lib/particlestep]
- [0x5400, c, lib/particlealloc]
- [0x551C, c, lib/draw]
- [0x6178, c, lib/emitteralloc]
- [0x6298, c, lib/spawn]
- [0x804C, c, lib/list]
- [0x8668, c, lib/trail]
- [0x87DC, c, lib/strands]
- [0x8CC8, c, lib/tables]
- [0x8FDC, c, lib/bankclear]
- [0x9034, c, lib/drawscript]
- [0x9498, c, effect_052]
# particlestep's jump table, then the pad its section end carried, then
# list's two, then the script dispatch tables.
- [0x9BDC, .rodata, lib/particlestep]
- [0x9BF0, pad]
- [0x9BF4, .rodata, lib/list]
- [0x9C20, .rodata, effect_052]
- [0x9C68, bin, effect_052]
- [0x3C6D8]
- name: effect_053
sha1: 738b1bb7de8b266db68995f925e9602f88fca51f
Expand Down
116 changes: 116 additions & 0 deletions config/symbols.effect_052.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
effectTextInit = 0x801A01EC; // type:func
effectTextHex = 0x801A033C; // type:func
effectTextNewline = 0x801A03E8; // type:func
effectNop = 0x801A0408; // type:func
effectDrawQuad128 = 0x801A0410; // type:func
effectDrawQuad256 = 0x801A050C; // type:func
effectMatrixIdentity = 0x801A0608; // type:func
effectMatrixRotX = 0x801A0640; // type:func
effectMatrixRotY = 0x801A07D0; // type:func
effectMatrixRotZ = 0x801A095C; // type:func
effectMatrixHeading = 0x801A0AE8; // type:func
effectReleaseWait = 0x801A0B18; // type:func
effectSpawnTask = 0x801A0B40; // type:func
effectCacheSlotAnchors = 0x801A0CCC; // type:func
effectSlotAnchor0 = 0x801A0E00; // type:func
effectSlotAnchor1 = 0x801A0E30; // type:func
effectSlotAnchorMid = 0x801A0E60; // type:func
effectCacheAnimSlotAnchors = 0x801A0E90; // type:func
effectAnimSlotAnchor0 = 0x801A0FCC; // type:func
effectAnimSlotAnchor1 = 0x801A0FFC; // type:func
effectAnimSlotAnchorMid = 0x801A102C; // type:func
effectUpdateModelBounds = 0x801A105C; // type:func
effectGetModelBounds = 0x801A12A8; // type:func
effectModelRadius = 0x801A12F8; // type:func
effectModelHalfHeight = 0x801A139C; // type:func
effectModelHalfWidth = 0x801A13CC; // type:func
effectModelHeight = 0x801A1424; // type:func
effectModelTop = 0x801A1448; // type:func
effectModelBottom = 0x801A1490; // type:func
effectModelRandomY = 0x801A14D8; // type:func
effectModelCentreY = 0x801A1590; // type:func
effectModelCentre = 0x801A15E4; // type:func
effectZeroWords = 0x801A1650; // type:func
effectTintPlay = 0x801A1688; // type:func
effectRandBetween = 0x801A1964; // type:func
effectRandProduct = 0x801A19E8; // type:func
effectRandVector = 0x801A1A8C; // type:func
effectMatrixFromAngles = 0x801A1B04; // type:func
effectJitterAngle = 0x801A1BD0; // type:func
effectJitterVector = 0x801A1C64; // type:func
effectJitterAngleS = 0x801A1CDC; // type:func
effectJitterSVector = 0x801A1D6C; // type:func
effectCopyVector = 0x801A1DE4; // type:func
effectFadeValue = 0x801A1E14; // type:func
effectFadeVector = 0x801A1E70; // type:func
effectBlendPointSets = 0x801A1F3C; // type:func
effectEmitTris = 0x801A20D0; // type:func
effectEmitQuads = 0x801A239C; // type:func
effectEmitTexTris = 0x801A26C0; // type:func
effectEmitTexQuads = 0x801A2A48; // type:func
effectEmitGouraudTris = 0x801A2E2C; // type:func
effectEmitGouraudQuads = 0x801A3134; // type:func
effectEmitGouraudTexTris = 0x801A34BC; // type:func
effectEmitGouraudTexQuads = 0x801A3878; // type:func
effectEmitStream = 0x801A3CC0; // type:func
effectBuildMeshPacket = 0x801A3F04; // type:func
effectParticleLateStep = 0x801A410C; // type:func
effectParticleAdvance = 0x801A41C4; // type:func
effectParticleAgeHold = 0x801A49CC; // type:func
effectParticlePose = 0x801A4AC0; // type:func
effectParticleAlloc = 0x801A5400; // type:func
effectStepRunKind = 0x801A551C; // type:func
effectStepFire = 0x801A5554; // type:func
effectParticleStep = 0x801A5600; // type:func
effectEmitterCountStep = 0x801A56EC; // type:func
effectSpriteEmit = 0x801A5704; // type:func
effectSpritePacket = 0x801A5D30; // type:func
effectParticleDrawPacket = 0x801A5F98; // type:func
effectDrawParticles = 0x801A6058; // type:func
effectEmitterAlloc = 0x801A6178; // type:func
effectEmitterAge = 0x801A6298; // type:func
effectEmitterSpawn = 0x801A6300; // type:func
effectEmitterSpawnShare = 0x801A6D9C; // type:func
effectEmitterStep = 0x801A6E9C; // type:func
effectEmitterOnStrand = 0x801A6F3C; // type:func
effectEmitterOnTrail = 0x801A71C4; // type:func
effectEmitterOnOwner = 0x801A73CC; // type:func
effectEmitterSlide = 0x801A75DC; // type:func
effectListAppend = 0x801A804C; // type:func
effectListRemove = 0x801A8088; // type:func
effectListClear = 0x801A80C8; // type:func
effectListRun = 0x801A80E0; // type:func
effectEmitterSetup = 0x801A8168; // type:func
effectStepFireSlots = 0x801A839C; // type:func
effectEmittersOnCue = 0x801A8450; // type:func
effectTrailPush = 0x801A858C; // type:func
effectTrailAim = 0x801A8668; // type:func
effectStrandsSeed = 0x801A87DC; // type:func
effectStrandsPush = 0x801A88E8; // type:func
effectStrandsAim = 0x801A8A00; // type:func
effectPoseTablesRelocate = 0x801A8CC8; // type:func
effectStartChildScript = 0x801A8F6C; // type:func
effectBanksClear = 0x801A8FDC; // type:func
effectDrawScriptStart = 0x801A9034; // type:func
effectDrawScriptRun = 0x801A92DC; // type:func
effectDrawListSpan = 0x801A9404; // type:func
func_801A953C = 0x801A953C; // type:func
func_801A96F8 = 0x801A96F8; // type:func
func_801A99E4 = 0x801A99E4; // type:func
g_effectStackBase = 0x801D399C;
g_effectStackTop = 0x801D39A0;
g_effectEmitterBank = 0x801D39A8;
g_effectParticleBank = 0x801D39AC;
g_effectDrawList = 0x801D39B0;
g_effectEmitterCursor = 0x801D39B4;
g_effectParticleCursor = 0x801D39B6;
g_effectParticleTotal = 0x801D39B8;
g_effectLiveTotal = 0x801D39BA;
g_effectBankUnk90 = 0x801D39BC;
g_effectBankUnk92 = 0x801D39BE;
g_effectChildPool = 0x801D41B4;
g_effectPrimCursor = 0x801D41C4;
g_effectHexGlyphs = 0x801D4504;
g_effectTextX = 0x801D4518;
g_effectTextY = 0x801D451C;
g_effectTextColour = 0x801D4520;
60 changes: 60 additions & 0 deletions include/effect/effect_052.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
#ifndef EFFECT_EFFECT_052_H
#define EFFECT_EFFECT_052_H

#include "effect.h"
#include "effect/lib/particle.h"
#include "effect/lib/tint.h"

/**
* @file effect_052.h
* @brief X-Potion: the overlay's own storage.
*/

/** @brief Argument the frame-20 child is started with. */
extern EffectTintStep D_801A9C68[];

/** @brief Sound cue the take-model script fires on its first frame. */
extern u8 D_801A9C74[];

/** @brief Pool the trailing sparks are allocated from. */
extern s32 D_801D4424;

/** @brief Pool the frame-20 child is allocated from. */
extern s32 D_801D44F4;

/** @brief Pose script the model-taking handler runs. */
extern EffectPoseTables D_801D4524;

/** @brief Cleared when the effect starts. */
extern s32 D_801D3994;
extern s32 D_801D3998;

/** @brief Task pools the script's children run in. */
extern s32 D_801D42B4;
extern s32 D_801D41E4;
extern s32 D_801D42C4;
extern s32 D_801D4434;
extern s32 D_801D39C4;

/** @brief Table of two offsets battle.bin resolves when the effect starts. */
extern u8 D_801A9DD4;

/** @brief TIM uploaded to VRAM when the effect starts; also the first bank. */
extern u8 D_801AA974;

/** @brief Cursor the record banks are carved off, moving up as they are taken. */
extern u8 *D_801D39A4;

/** @brief Cursor the effect's second prim buffer is written through. */
extern void *D_801D41C8;

/** @brief The four bank pointers the emitters and the renderer read. */
extern void *D_801D41CC;
extern void *D_801D41D0;
extern void *D_801D41D4;
extern void *D_801D41D8;

/** @brief Run one frame of the effect: its opcode, then every task pool it owns. */
s32 func_801A99EC(EffectEntity *entity);

#endif /* EFFECT_EFFECT_052_H */
19 changes: 19 additions & 0 deletions include/effect/effect_052_entry.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
#ifndef EFFECT_EFFECT_052_ENTRY_H
#define EFFECT_EFFECT_052_ENTRY_H

#include "effect.h"

/**
* @file effect_052_entry.h
* @brief X-Potion: the overlay entry point.
*/

/**
* @brief Start the effect's script and hand back its task pool.
*
* @param animSet Animation set the effect plays.
* @return The pool the root entity lives in.
*/
void *func_801A0000(EffectAnimSet *animSet);

#endif /* EFFECT_EFFECT_052_ENTRY_H */
13 changes: 13 additions & 0 deletions include/effect/params/effect_052/effect_params.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#ifndef EFFECT_PARAMS_H
#define EFFECT_PARAMS_H

/**
* @file effect_params.h
* @brief X-Potion: the ring sizes its particle engine is built with.
*/

/** @brief Highest index each ring reaches before it wraps. */
#define EFFECT_EMITTER_COUNT 0x59
#define EFFECT_PARTICLE_COUNT 0x8B

#endif /* EFFECT_PARAMS_H */
Loading
Loading