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 effect_052 effect_039 effect_056 effect_050 effect_051 effect_036
EFFECTS ?= effect_001 effect_025 effect_028 effect_052 effect_039 effect_056 effect_050 effect_051 effect_036 effect_027
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
30 changes: 27 additions & 3 deletions config/ff8.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1097,16 +1097,40 @@ binaries:
options:
target_path: original/effect/effect_027.bin
src_path: src/effect
section_order: [.text, .rodata, .data, .bss]
segments:
- name: effect_027
type: code
start: 0x0
vram: 0x801A0000
subsegments:
- [0x0, c, effect_027]
- [0x9BB8, .rodata, effect_027]
- [0x9BCC, bin, effect_027]
- [0x0, c, effect_027_entry]
- [0x1EC, c, lib/common]
- [0x95C, c, lib/rotz]
- [0xAE8, c, lib/heading]
- [0xB18, c, lib/entity]
- [0x1688, c, lib/vector]
- [0x1DF4, c, lib/emit]
- [0x3C28, c, lib/packet]
- [0x3E30, c, lib/particlestep]
- [0x5124, c, lib/particlealloc]
- [0x5240, c, lib/draw]
- [0x5E9C, c, lib/emitteralloc]
- [0x5FBC, c, lib/spawn]
- [0x7D70, c, lib/list]
- [0x838C, c, lib/trail]
- [0x8500, c, lib/strands]
- [0x89EC, c, lib/tables]
- [0x8D00, c, lib/bankclear]
- [0x8D58, c, lib/drawscript]
- [0x91BC, c, effect_027]
- [0x9BB8, .rodata, lib/particlestep]
- [0x9BCC, pad]
- [0x9BD0, .rodata, lib/list]
- [0x9BFC, .rodata, effect_027]
- [0x9C5C, bin, effect_027]
- [0x3AAF8]

- name: effect_028
sha1: eb8243db98aedc14e57e62c7b42d639c8171f9c5
options:
Expand Down
112 changes: 112 additions & 0 deletions config/symbols.effect_027.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
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
effectRandBetween = 0x801A1688; // type:func
effectRandProduct = 0x801A170C; // type:func
effectRandVector = 0x801A17B0; // type:func
effectMatrixFromAngles = 0x801A1828; // type:func
effectJitterAngle = 0x801A18F4; // type:func
effectJitterVector = 0x801A1988; // type:func
effectJitterAngleS = 0x801A1A00; // type:func
effectJitterSVector = 0x801A1A90; // type:func
effectCopyVector = 0x801A1B08; // type:func
effectFadeValue = 0x801A1B38; // type:func
effectFadeVector = 0x801A1B94; // type:func
effectBlendPointSets = 0x801A1C60; // type:func
effectEmitTris = 0x801A1DF4; // type:func
effectEmitQuads = 0x801A20C0; // type:func
effectEmitTexTris = 0x801A23E4; // type:func
effectEmitTexQuads = 0x801A276C; // type:func
effectEmitGouraudTris = 0x801A2B50; // type:func
effectEmitGouraudQuads = 0x801A2E58; // type:func
effectEmitGouraudTexTris = 0x801A31E0; // type:func
effectEmitGouraudTexQuads = 0x801A359C; // type:func
effectEmitStream = 0x801A39E4; // type:func
effectBuildMeshPacket = 0x801A3C28; // type:func
effectParticleLateStep = 0x801A3E30; // type:func
effectParticleAdvance = 0x801A3EE8; // type:func
effectParticleAgeHold = 0x801A46F0; // type:func
effectParticlePose = 0x801A47E4; // type:func
effectParticleAlloc = 0x801A5124; // type:func
effectStepRunKind = 0x801A5240; // type:func
effectStepFire = 0x801A5278; // type:func
effectParticleStep = 0x801A5324; // type:func
effectEmitterCountStep = 0x801A5410; // type:func
effectSpriteEmit = 0x801A5428; // type:func
effectSpritePacket = 0x801A5A54; // type:func
effectParticleDrawPacket = 0x801A5CBC; // type:func
effectDrawParticles = 0x801A5D7C; // type:func
effectEmitterAlloc = 0x801A5E9C; // type:func
effectEmitterAge = 0x801A5FBC; // type:func
effectEmitterSpawn = 0x801A6024; // type:func
effectEmitterSpawnShare = 0x801A6AC0; // type:func
effectEmitterStep = 0x801A6BC0; // type:func
effectEmitterOnStrand = 0x801A6C60; // type:func
effectEmitterOnTrail = 0x801A6EE8; // type:func
effectEmitterOnOwner = 0x801A70F0; // type:func
effectEmitterSlide = 0x801A7300; // type:func
effectListAppend = 0x801A7D70; // type:func
effectListRemove = 0x801A7DAC; // type:func
effectListClear = 0x801A7DEC; // type:func
effectListRun = 0x801A7E04; // type:func
effectEmitterSetup = 0x801A7E8C; // type:func
effectStepFireSlots = 0x801A80C0; // type:func
effectEmittersOnCue = 0x801A8174; // type:func
effectTrailPush = 0x801A82B0; // type:func
effectTrailAim = 0x801A838C; // type:func
effectStrandsSeed = 0x801A8500; // type:func
effectStrandsPush = 0x801A860C; // type:func
effectStrandsAim = 0x801A8724; // type:func
effectPoseTablesRelocate = 0x801A89EC; // type:func
effectStartChildScript = 0x801A8C90; // type:func
effectBanksClear = 0x801A8D00; // type:func
effectDrawScriptStart = 0x801A8D58; // type:func
effectDrawScriptRun = 0x801A9000; // type:func
effectDrawListSpan = 0x801A9128; // type:func
g_effectStackBase = 0x801D35BC;
g_effectStackTop = 0x801D35C0;
g_effectEmitterBank = 0x801D3864;
g_effectParticleBank = 0x801D3868;
g_effectDrawList = 0x801D386C;
g_effectEmitterCursor = 0x801D3870;
g_effectParticleCursor = 0x801D3872;
g_effectParticleTotal = 0x801D3874;
g_effectLiveTotal = 0x801D3876;
g_effectBankUnk90 = 0x801D3878;
g_effectBankUnk92 = 0x801D387A;
g_effectChildPool = 0x801D4074;
g_effectPrimCursor = 0x801D4084;
g_effectHexGlyphs = 0x801D42F4;
g_effectTextX = 0x801D4308;
g_effectTextY = 0x801D430C;
g_effectTextColour = 0x801D4310;
68 changes: 68 additions & 0 deletions include/effect/effect_027.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
#ifndef EFFECT_EFFECT_027_H
#define EFFECT_EFFECT_027_H

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

/**
* @file
* @brief Full-Life: the overlay's own storage.
*/

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

/** @brief Sound cue the script fires on its first frame. */
extern u8 D_801A9C5C[];

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

/** @brief Task pools the script's children run in, and their storage. */
extern s32 D_801D4174;
extern s32 D_801D42E4;
extern s32 D_801D3854;
extern s32 D_801D40A4;
extern s32 D_801D4184;
extern s32 D_801D3884;
extern s32 D_801D35D4;

/** @brief Cleared when the effect starts. */
extern s32 D_801D35B4;
extern s32 D_801D35B8;

/**
* @name Prim buffers
*
* Two of each, so the frame being built and the frame being drawn never share.
* @{
*/
extern void *D_801D408C;
extern void *D_801D4090;
extern void *D_801D4094;
extern void *D_801D4098;
/** @} */

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

/**
* @name Overlay blob
*
* The data carried in the overlay image behind the code.
* @{
*/

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

/** @brief TIM uploaded to VRAM when the effect starts. */
extern u8 D_801AA794;
/** @} */

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

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

#include "effect.h"

/**
* @file effect_027_entry.h
* @brief Full-Life: 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_027_ENTRY_H */
13 changes: 13 additions & 0 deletions include/effect/params/effect_027/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 Full-Life: the ring sizes its particle engine is built with.
*/

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

#endif /* EFFECT_PARAMS_H */
4 changes: 2 additions & 2 deletions src/effect/effect_025.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,7 +279,7 @@ static void func_801A71B8(EffectEntity *entity) {
entity->pos.vx = 0x600;
entity->pc++;
}
for (i = 3; i >= 0; i--) {
for (i = 0; i < 4; i++) {
tint->level = entity->pos.vx;
tint++;
}
Expand All @@ -304,7 +304,7 @@ static void func_801A7240(EffectEntity *entity) {
entity->flags |= EFFECT_FLAG_STOP;
entity->pc++;
}
for (i = 3; i >= 0; i--) {
for (i = 0; i < 4; i++) {
tint->level = entity->pos.vx;
tint++;
}
Expand Down
Loading
Loading