14 switch (task->
state) {
#define BATTLE_TASK_CAMERA
#define BATTLE_TASK_MODELS
the fighters'
FIGHTSTG.PRO: the battle.
BattleScript * FIGHTSTG_createBattleScript(void)
Creates a battle script, which plays a technique (FIGHTSTG_updateBattleScript)
GfxState GFX
GFX: the graphics state and its methods.
HitEffect * FIGHTSTG_startHitEffect()
WFIGHTMN passes the damage as a third argument, which it doesn't read; its code loads it,...
FileCache FILE_CACHE
The file cache.
void FIGHTSTG_updateHitEffect(HitEffect *task, HitEffectChildren *children)
Loads effect 0x33, then turns the camera to the enemy's view, plays the effect with a sound and,...
const SVECTOR FIGHTSTG_hitEffectPos
where FIGHTSTG_updateHitEffect's effect 0x33 is: a screen position, in front (z 0x7FFF,...
TaskRegistry TASK_REGISTRY
SoundState SOUND
rsin and rcos (libgte) read rsin_tbl[a - 0x800] and the like: their addresses before the table fall i...
s32 FIGHTSTG_findEffectSheet(s32 effect, s32 *images, s32 *sheet, Vec2 *texPos)
Finds 2D effect effect's sheet (FIGHTSTG_spriteEffects, FIGHTSTG_effectSheets) and gives its values; ...
SpriteEffect * FIGHTSTG_startSpriteEffect(s32 effect, const SVECTOR *pos)
Starts 2D effect effect (FIGHTSTG_spriteEffects) at pos; killed at once when it has no entry.
The battle camera (FIGHTSTG_createBattleCamera), registered as BATTLE_TASK_CAMERA on a layer: set put...
CameraView *(* getEnemyView)(struct BattleCamera *task)
void(* set)(struct BattleCamera *task, CameraView *view)
s32 enemy
the script is the enemy's (nonzero) or the partner's
s32 unk74
HitEffect.unk5C; nothing reads it.
s32 index
the script, in the fighter's archive
s32(* isLoading)(s32 file)
s32(* getFrameTime)(void)
FIGHTSTG_updateHitEffect's children.
FIGHTSTG_startHitEffect's task: the enemy's view, effect 0x33 on the player's fighter,...
void(* nextStep)(struct HitEffect *task)
struct BattleCamera * camera
s32 effectImages
FIGHTSTG_findEffectSheet's.
void(* setState)(struct HitEffect *task, s32 state)
void(* nextState)(struct HitEffect *task)
s32 unk5C
FIGHTSTG_startHitEffect's second argument: 1 from WFIGHTMN, 0 from WFIGHTTS; the script's unk74.
s32 result
1 a hit, 2 a knockout: the script is result + 1
void(* nextSubstate)(struct HitEffect *task)
s32 sheet
its file in the high half
short(* playSound)(s32 id)
returns the voice of a key-on
void *(* find)(s32 id, s32 key1, s32 key2)
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find