11 switch (task->
state) {
46 if (task->
kind == 4) {
49 if (task->
kind == 5) {
53 if (task->
t < 0x1000) {
69 if (task->
kind == 4) {
72 if (task->
kind == 5) {
84 { 640, 136 }, { 1280, 102 }, { 1920, 81 }, { 2560, 64 }, { 1280, 64 }, { 0, 42 },
95 task->
y = control->
pos.
y;
109 switch (task->
state) {
117 from.vx = task->
from.
x;
118 from.vy = task->
from.
y;
119 from.vz = task->
from.
z;
128 if (task->
t >= 0x1000) {
149 task->
tStep = 0x1000 / time;
Battle FIGHTSTG_battle
the battle: its fighters, speed and drawing functions
FIGHTSTG.PRO: the battle.
#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
JumpParams FIGHTSTG_jumps[]
the jumps of FIGHTSTG_startJump, by kind from 1
void FIGHTSTG_updateJump(Jump *task)
The jump's task: lifts its model and drops it along ease curves at its speed; kind 4 also moves it fo...
Jump * FIGHTSTG_startJump(ModelControl *control, s32 kind, s32 distance)
Starts a jump of control's model of kind 1-6 (FIGHTSTG_jumps), forward by distance for kind 4.
void FIGHTSTG_updateMove(MoveTask *task)
The move's task: takes the model from from to to along tStep, a step each frame, and dies there.
MoveTask * FIGHTSTG_startMove(ModelControl *control, ShortVec3 *to, s32 time)
Moves control's model from where it is to to over time frames.
s32 frames
since the last update
s32(* ease)(s32 curve, s32 t, s32 value)
value scaled by a curve of t
void(* lerp)(SVECTOR *from, SVECTOR *to, s32 t, SVECTOR *out)
t: 0-0x1000
The jump heights and speeds (t per frame) of the Jump kinds 1-6.
A ModelControl's jump (FIGHTSTG_startJump): up and down from its y, or for kinds 4 and 5 also forward...
void(* nextState)(struct Jump *task)
s32 zTravel
kinds 4 and 5: the z it moves from home, negated for the enemy
s32 distance
kind 4: past 0x2800
What drives a Model, owned by whoever created it.
FIGHTSTG_startMove's task: moves a ModelControl to a position.
void(* setState)(struct MoveTask *task, s32 state)
void(* nextState)(struct MoveTask *task)
A position or rotation, without the SVECTOR pad.
void * createTask(void(*update)(), s32 size, s32 childrenSize)
createTaskWithId for a task nothing needs to find