18 switch (task->
state) {
32 if (task->
t != 0x1000) {
84 RotMatrixYXZ_gte(&task->
current.
rot, &coord.coord);
100 GsSetRefView2(&view);
103 if (task->
t == 0x1000) {
132 task->
tStep = 0x100000 / time;
149 if (models ==
NULL) {
195 if (models ==
NULL) {
FighterCache FIGHTSTG_fighterCache
the fighters' data, loaded one at a time
#define BATTLE_TASK_CAMERA
#define BATTLE_TASK_MODELS
the fighters'
CameraView * FIGHTSTG_getFighterView(BattleCamera *task, s32 id, s32 camera)
The view of a fighter's camera (id as Models.getFighter takes it), which ends the battle camera's fad...
void FIGHTSTG_updateBattleCamera(BattleCamera *task)
The battle camera's task: fades its view from from to to (position, reference, translation,...
CameraView * FIGHTSTG_getEnemyView(BattleCamera *task)
The view of the enemy's last camera.
void FIGHTSTG_setBattleCameraView(BattleCamera *task, CameraView *view)
BattleCamera.set: puts the battle camera at view.
void FIGHTSTG_fadeBattleCamera(BattleCamera *task, CameraView *from, CameraView *to, s32 time)
BattleCamera.fade: fades the battle camera from from (or where it is) to to over time frames.
BattleCamera * FIGHTSTG_createBattleCamera(s32 layerId)
Creates the battle camera (BATTLE_TASK_CAMERA) on a layer.
FIGHTSTG.PRO: the battle.
GfxState GFX
GFX: the graphics state and its methods.
#define TASK_INIT
Tasks: every game object is a task, a heap block that starts with this header and is updated once per...
InterpFuncs FIGHTSTG_interp
the functions that go between values
CameraView FIGHTSTG_fighterView
the view FIGHTSTG_getFighterView makes
TaskRegistry TASK_REGISTRY
The battle camera (FIGHTSTG_createBattleCamera), registered as BATTLE_TASK_CAMERA on a layer: set put...
CameraView *(* getFighterView)(struct BattleCamera *task, s32 id, s32 camera)
void(* setState)(struct BattleCamera *task, s32 state)
void(* nextSubstate)(struct BattleCamera *task)
void(* setSubstate)(struct BattleCamera *task, s32 substate)
CameraView *(* getEnemyView)(struct BattleCamera *task)
void(* set)(struct BattleCamera *task, CameraView *view)
void(* fade)(struct BattleCamera *task, CameraView *from, CameraView *to, s32 time)
from: NULL for the current
void(* nextState)(struct BattleCamera *task)
Where the battle camera looks from and to, as a GsRVIEW2 with the transform of its coordinate system.
s32 rz
the roll, in degrees
s32 proj
the projection distance
An enemy's FighterInfo: it has 3 cameras where a partner has 12.
FighterInfo *(* getInfo)(s32 id)
A fighter's entry in its file, from FIGHTSTG_fighterCache.funcs.getInfo.
ShortVec3 camPos[12]
the cameras that look at it; an enemy has 3 of each and then their count
s32(* getFrameTime)(void)
struct Layer *(* getLayer)(s32 id)
void(* lerp)(SVECTOR *from, SVECTOR *to, s32 t, SVECTOR *out)
t: 0-0x1000
A drawing layer (GFX.funcs.createLayer): a DRAWENV with a pair of ordering tables,...
The fighters' models (FIGHTSTG_createModels), registered as BATTLE_TASK_MODELS: up to four,...
s32(* getFighter)(struct Models *task, s32 id)
void *(* find)(s32 id, s32 key1, s32 key2)
void * createTaskWithId(void(*update)(), s32 size, s32 childrenSize, s32 id)
Allocates a zeroed task of size bytes (header included) with room for childrenSize / 4 child tasks.