7#ifndef CHOMP_CHAIN_FIRST_PART_IDX
8 #error CHOMP_CHAIN_FIRST_PART_IDX is not defined!
12#ifndef CHOMP_CHAIN_LAST_PART_IDX
13 #error CHOMP_CHAIN_LAST_PART_IDX is not defined!
17#ifndef CHOMP_CHAIN_AVAR_SOUNDS
18 #error CHOMP_CHAIN_AVAR_SOUNDS is not defined!
29#define NUM_CHAIN_LINKS (1 + CHOMP_CHAIN_LAST_PART_IDX - CHOMP_CHAIN_FIRST_PART_IDX)
31API_CALLABLE(N(ChompChainInit)) {
40 actor->
state.functionTempPtr[0] = chainParts;
70 script->curPos.x += -magnitude * dirX;
71 script->curPos.y += magnitude * dirY;
79 *x = magnitude * dirY;
82API_CALLABLE(N(ChompChainUpdate)) {
95 actor =
get_actor(script->owner1.actorID);
100 #if CHOMP_CHAIN_UPDATE_Z == TRUE
107 chain = actor->
state.functionTempPtr[0];
112 prevX = actor->
curPos.
x + 12.0;
157 chain->
velY += sp18 * 0.5;
183 #if CHOMP_CHAIN_UPDATE_Z == TRUE
void N ChompChainGetPolarX(f32 *x, f32 magnitude, f32 angleDeg)
void N ChompChainAddPolarPos(ChompChain *script, f32 magnitude, f32 angleDeg)
#define sfx_play_sound_at_position
s32 evt_get_variable(Evt *script, Bytecode var)
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
ActorPart * get_actor_part(Actor *actor, s32 partID)
Actor * get_actor(s32 actorID)
void * heap_malloc(s32 size)
#define CHOMP_CHAIN_AVAR_SOUNDS
#define CHOMP_CHAIN_FIRST_PART_IDX