Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
watt.c
Go to the documentation of this file.
1#include "common.h"
2#include "effects.h"
3#include "../src/world/partners.h"
4#include "npc.h"
5#include "sprite/npc/WorldWatt.h"
6#include "sprite.h"
7#include "sprite/player.h"
8
9#define NAMESPACE world_watt
10
12void N(sync_held_position)(void);
13void N(update_player_carry_anim)(void);
14
15BSS b32 N(D_802BE300);
16BSS s32 N(AbilityState);
17BSS b32 N(D_802BE308);
18BSS b32 N(IsPlayerHolding);
19BSS EffectInstance* N(StaticEffect);
20BSS s32 N(D_802BE314); // unused (padding?)
21
22enum {
23 // next two states lock input for a few frames, during which the ability can be canceled
30};
31
33 if (!(npc->flags & NPC_FLAG_INVISIBLE)) {
34 if (N(StaticEffect) == NULL) {
35 N(StaticEffect) = fx_static_status(0, npc->pos.x, npc->pos.y + 13.0f, npc->pos.z, 0.9f, 5, 0);
36 }
37 }
38}
39
40void N(dispose_static_effect)(void) {
41 if (N(StaticEffect) != NULL) {
42 N(StaticEffect)->data.staticStatus->timeLeft = 1;
43 N(StaticEffect) = NULL;
44 }
45}
46
47s32 N(EffectAnimLengths)[] = { 24, 6 }; // second type is different from length in static_status.c (6 vs 12)
48
49void N(reset_static_effect)(s32 type) {
50 EffectInstance* effect = N(StaticEffect);
51 StaticStatusFXData* part = effect->data.staticStatus;
52 f32 invisTime;
53 s32 count;
54 s32 i;
55
56 part->type = type;
57 invisTime = N(EffectAnimLengths)[type] * 0.5f;
58 count = effect->numParts - 1;
59
60 part++;
61 for (i = 1; i < count; i++, part++) {
62 part->frame = -1.0f - (invisTime * (i & 1));
63 }
64}
65
66void N(init)(Npc* npc) {
67 npc->collisionHeight = 24;
68 npc->collisionDiameter = 24;
69 N(D_802BE308) = FALSE;
70 N(D_802BE300) = FALSE;
71 N(IsPlayerHolding) = FALSE;
72 N(AbilityState) = SHINING_STATE_BEGIN;
73 N(StaticEffect) = NULL;
74}
75
76API_CALLABLE(N(TakeOut)) {
77 Npc* watt = script->owner2.npc;
78
79 if (isInitialCall) {
81 }
82
83 if (partner_get_out(watt)) {
84 return ApiStatus_DONE1;
85 } else {
86 return ApiStatus_BLOCK;
87 }
88}
89
91 Call(N(TakeOut))
92 Return
93 End
94};
95
96BSS TweesterPhysics N(TweesterPhysicsData);
97TweesterPhysics* N(TweesterPhysicsPtr) = &N(TweesterPhysicsData);
98
99b32 N(WattIsMoving) = FALSE;
100
101API_CALLABLE(N(Update)) {
102 PlayerData* playerData = &gPlayerData;
103 Npc* watt = script->owner2.npc;
104 f32 sinAngle, cosAngle, liftoffVelocity;
105 Entity* entity;
106
108 if (isInitialCall) {
109 partner_flying_enable(watt, 1);
110 mem_clear(N(TweesterPhysicsPtr), sizeof(TweesterPhysics));
112 }
113
115 playerData->partnerUsedTime[PARTNER_WATT]++;
116
117 if (entity == NULL) {
118 N(create_static_effect)(watt);
121 if (watt->moveSpeed != 0.0f) {
122 if (!N(WattIsMoving)) {
123 N(WattIsMoving) = TRUE;
125 watt->curAnim = ANIM_WorldWatt_Run;
126 }
127 } else {
128 if (N(WattIsMoving)) {
129 N(WattIsMoving) = FALSE;
131 watt->curAnim = ANIM_WorldWatt_Idle;
132 }
133 }
134 if (N(StaticEffect) != NULL) {
135 N(StaticEffect)->data.staticStatus->pos.x = watt->pos.x;
136 N(StaticEffect)->data.staticStatus->pos.y = watt->pos.y + 13.0f;
137 N(StaticEffect)->data.staticStatus->pos.z = watt->pos.z;
138 }
139 return ApiStatus_BLOCK;
140 }
141
142 switch (N(TweesterPhysicsPtr)->state) {
144 N(TweesterPhysicsPtr)->state++;
145 N(TweesterPhysicsPtr)->prevFlags = watt->flags;
146 N(TweesterPhysicsPtr)->radius = fabsf(dist2D(watt->pos.x, watt->pos.z, entity->pos.x, entity->pos.z));
147 N(TweesterPhysicsPtr)->angle = atan2(entity->pos.x, entity->pos.z, watt->pos.x, watt->pos.z);
148 N(TweesterPhysicsPtr)->angularVel = 6.0f;
149 N(TweesterPhysicsPtr)->liftoffVelPhase = 50.0f;
150 N(TweesterPhysicsPtr)->countdown = 120;
152 watt->flags &= ~NPC_FLAG_GRAVITY;
154 sin_cos_rad(DEG_TO_RAD(N(TweesterPhysicsPtr)->angle), &sinAngle, &cosAngle);
155 watt->pos.x = entity->pos.x + (sinAngle * N(TweesterPhysicsPtr)->radius);
156 watt->pos.z = entity->pos.z - (cosAngle * N(TweesterPhysicsPtr)->radius);
157 N(TweesterPhysicsPtr)->angle = clamp_angle(N(TweesterPhysicsPtr)->angle - N(TweesterPhysicsPtr)->angularVel);
158
159 if (N(TweesterPhysicsPtr)->radius > 20.0f) {
160 N(TweesterPhysicsPtr)->radius--;
161 } else if (N(TweesterPhysicsPtr)->radius < 19.0f) {
162 N(TweesterPhysicsPtr)->radius++;
163 }
164
165 liftoffVelocity = sin_rad(DEG_TO_RAD(N(TweesterPhysicsPtr)->liftoffVelPhase)) * 3.0f;
166 N(TweesterPhysicsPtr)->liftoffVelPhase += 3.0f;
167
168 if (N(TweesterPhysicsPtr)->liftoffVelPhase > 150.0f) {
169 N(TweesterPhysicsPtr)->liftoffVelPhase = 150.0f;
170 }
171
172 watt->pos.y += liftoffVelocity;
173 watt->renderYaw = clamp_angle(360.0f - N(TweesterPhysicsPtr)->angle);
174 N(TweesterPhysicsPtr)->angularVel += 0.8;
175
176 if (N(TweesterPhysicsPtr)->angularVel > 40.0f) {
177 N(TweesterPhysicsPtr)->angularVel = 40.0f;
178 }
179
180 if (--N(TweesterPhysicsPtr)->countdown == 0) {
181 N(TweesterPhysicsPtr)->state++;
182 }
183 break;
185 watt->flags = N(TweesterPhysicsPtr)->prevFlags;
186 N(TweesterPhysicsPtr)->countdown = 30;
187 N(TweesterPhysicsPtr)->state++;
188 break;
192 if (--N(TweesterPhysicsPtr)->countdown == 0) {
193 N(TweesterPhysicsPtr)->state = TWEESTER_PARTNER_INIT;
195 }
196 break;
197 }
198
199 if (N(StaticEffect) != NULL) {
200 N(StaticEffect)->data.staticStatus->pos.x = watt->pos.x;
201 N(StaticEffect)->data.staticStatus->pos.y = watt->pos.y + 13.0f;
202 N(StaticEffect)->data.staticStatus->pos.z = watt->pos.z;
203 }
204 }
205 return ApiStatus_BLOCK;
206}
207
209 Call(N(Update))
210 Return
211 End
212};
213
214void N(try_cancel_tweester)(Npc* watt) {
215 if (TweesterTouchingPartner != NULL) {
217 watt->flags = N(TweesterPhysicsPtr)->prevFlags;
218 N(TweesterPhysicsPtr)->state = TWEESTER_PARTNER_INIT;
220 }
221}
222
223API_CALLABLE(N(UseAbility)) {
224 PlayerStatus* playerStatus = &gPlayerStatus;
225 PartnerStatus* partnerStatus = &gPartnerStatus;
226 Npc* npc = script->owner2.npc;
227 s32 actionState;
228
229 if (isInitialCall) {
230 N(try_cancel_tweester)(npc);
231 if ((playerStatus->animFlags & PA_FLAG_CHANGING_MAP)) {
232 return ApiStatus_DONE2;
233 }
234 if (!partnerStatus->shouldResumeAbility) {
235 if (partnerStatus->partnerActionState == ACTION_STATE_IDLE
237 {
238 return ApiStatus_DONE2;
239 }
240
242 if (playerStatus->animFlags & (PA_FLAG_USING_WATT | PA_FLAG_WATT_IN_HANDS)) {
243 N(AbilityState) = SHINING_STATE_BEGIN;
244 } else {
245 N(AbilityState) = SHINING_STATE_INIT;
246 }
247 } else if (playerStatus->animFlags & PA_FLAG_USING_WATT) {
248 N(AbilityState) = SHINING_STATE_RELEASE;
249 } else {
250 N(AbilityState) = SHINING_STATE_INIT;
251 }
252 } else {
253 partnerStatus->shouldResumeAbility = FALSE;
256 npc->curAnim = ANIM_WorldWatt_Idle;
257 N(AbilityState) = SHINING_STATE_HOLDING;
258 script->functionTemp[1] = 2;
259 }
260 }
261
262 switch (N(AbilityState)) {
264 if (playerStatus->inputDisabledCount != 0) {
265 return ApiStatus_DONE2;
266 }
267 script->functionTemp[1] = 3;
268 N(AbilityState) = SHINING_STATE_DELAY;
269 script->functionTemp[2] = playerStatus->inputDisabledCount;
270 break;
272 if (script->functionTemp[1] == 0) {
273 if (script->functionTemp[2] < playerStatus->inputDisabledCount
274 || playerStatus->animFlags & PA_FLAG_CHANGING_MAP
277 ) {
278 return ApiStatus_DONE2;
279 }
280 N(AbilityState) = SHINING_STATE_BEGIN;
281 break;
282 }
283 script->functionTemp[1]--;
284 break;
285 }
286
287 switch (N(AbilityState)) {
290 playerStatus->animFlags |= PA_FLAG_USING_WATT;
291 N(IsPlayerHolding) = TRUE;
295 partnerStatus->partnerActionState = PARTNER_ACTION_USE;
296 partnerStatus->actingPartner = PARTNER_WATT;
297 npc->moveToPos.x = playerStatus->pos.x;
298 npc->moveToPos.y = playerStatus->pos.y + 5.0f;
299 npc->moveToPos.z = playerStatus->pos.z;
300 npc->curAnim = ANIM_WorldWatt_Walk;
301 add_vec2D_polar(&npc->moveToPos.x, &npc->moveToPos.z, 15.0f, playerStatus->targetYaw);
302 npc->yaw = playerStatus->targetYaw;
303 npc->curAnim = ANIM_WorldWatt_Idle;
304 playerStatus->animFlags |= PA_FLAG_WATT_IN_HANDS;
307 script->functionTemp[1] = 2;
308 N(AbilityState) = SHINING_STATE_HOLDING;
309 } else {
310 playerStatus->animFlags |= PA_FLAG_USING_WATT;
311 N(IsPlayerHolding) = TRUE;
314 partnerStatus->partnerActionState = PARTNER_ACTION_USE;
315 partnerStatus->actingPartner = PARTNER_WATT;
317 npc->moveToPos.x = playerStatus->pos.x;
318 npc->moveToPos.y = playerStatus->pos.y + 5.0f;
319 npc->moveToPos.z = playerStatus->pos.z;
320 npc->curAnim = ANIM_WorldWatt_Walk;
321 add_vec2D_polar(&npc->moveToPos.x, &npc->moveToPos.z, 15.0f, playerStatus->targetYaw);
322 npc->duration = 8;
323 npc->yaw = atan2(npc->pos.x, npc->pos.z, playerStatus->pos.x, playerStatus->pos.z);
324 N(AbilityState)++; // SHINING_STATE_GATHER
325 }
326 break;
328 npc->pos.x += (npc->moveToPos.x - npc->pos.x) / npc->duration;
329 npc->pos.y += (npc->moveToPos.y - npc->pos.y) / npc->duration;
330 npc->pos.z += (npc->moveToPos.z - npc->pos.z) / npc->duration;
331 npc->duration--;
332 if (npc->duration == 0) {
333 npc->yaw = playerStatus->targetYaw;
334 npc->curAnim = ANIM_WorldWatt_Idle;
335 partnerStatus->actingPartner = PARTNER_WATT;
336 playerStatus->animFlags |= PA_FLAG_WATT_IN_HANDS;
338 script->functionTemp[1] = 2;
339 N(AbilityState) = SHINING_STATE_HOLDING;
340 }
341 break;
344#if VERSION_JP
345 // wait for begin holding cooldown
346 if (script->functionTemp[1] != 0) {
347 script->functionTemp[1]--;
348 break;
349 }
350 if (playerStatus->actionState == ACTION_STATE_USE_SPINNING_FLOWER) {
351 break;
352 }
353 // allow stop-holding input
354 actionState = playerStatus->actionState;
355 if ((actionState == ACTION_STATE_IDLE
356 || actionState == ACTION_STATE_WALK
357 || actionState == ACTION_STATE_RUN
358 || actionState == ACTION_STATE_LAND)
359 && partnerStatus->pressedButtons & BUTTON_B
360 || playerStatus->flags & PS_FLAG_HIT_FIRE
361 ) {
364 npc->curAnim = ANIM_WorldWatt_Idle;
366 N(IsPlayerHolding) = FALSE;
367 partnerStatus->actingPartner = PARTNER_NONE;
370 N(AbilityState) = SHINING_STATE_BEGIN;
372 if (!(playerStatus->flags & PS_FLAG_HIT_FIRE)) {
374 } else {
376 }
377 return ApiStatus_DONE1;
378 }
379#else
380 // immediately cancel state on touching fire
381 if ((playerStatus->flags & PS_FLAG_HIT_FIRE)) {
382 N(AbilityState) = SHINING_STATE_RELEASE;
383 break;
384 }
385 if (playerStatus->actionState == ACTION_STATE_USE_SPINNING_FLOWER) {
386 break;
387 }
388 // wait for begin holding cooldown
389 if (script->functionTemp[1] != 0) {
390 script->functionTemp[1]--;
391 break;
392 }
393 // allow stop-holding input
394 actionState = playerStatus->actionState;
395 if ((actionState == ACTION_STATE_IDLE
396 || actionState == ACTION_STATE_WALK
397 || actionState == ACTION_STATE_RUN
398 || actionState == ACTION_STATE_LAND)
399 && partnerStatus->pressedButtons & BUTTON_B
400 ) {
401 N(AbilityState) = SHINING_STATE_RELEASE;
402 }
403#endif
404 break;
405 }
406
407#if !VERSION_JP
408 if (N(AbilityState) == SHINING_STATE_RELEASE) {
410 npc->curAnim = ANIM_WorldWatt_Idle;
412 N(IsPlayerHolding) = FALSE;
413 partnerStatus->actingPartner = PARTNER_NONE;
416 N(AbilityState) = SHINING_STATE_BEGIN;
418 if (!(playerStatus->flags & PS_FLAG_HIT_FIRE)) {
420 }
421 return ApiStatus_DONE1;
422 }
423#endif
424
425 if (N(StaticEffect) != NULL) {
426 N(StaticEffect)->data.staticStatus->pos.x = npc->pos.x;
427 N(StaticEffect)->data.staticStatus->pos.y = npc->pos.y + 13.0f;
428 N(StaticEffect)->data.staticStatus->pos.z = npc->pos.z;
429 }
430 return ApiStatus_BLOCK;
431}
432
434 Call(N(UseAbility))
435 Return
436 End
437};
438
439API_CALLABLE(N(PutAway)) {
440 PlayerStatus* playerStatus = &gPlayerStatus;
441 PartnerStatus* partnerStatus = &gPartnerStatus;
442 Npc* watt = script->owner2.npc;
443
444 if (isInitialCall) {
447 force_player_anim(ANIM_Mario1_Idle);
448 partnerStatus->actingPartner = PARTNER_NONE;
452 }
453
454 if (partner_put_away(watt)) {
455 return ApiStatus_DONE1;
456 } else {
457 return ApiStatus_BLOCK;
458 }
459}
460
462 Call(N(PutAway))
463 Return
464 End
465};
466
467void N(pre_battle)(Npc* watt) {
468 PartnerStatus* partnerStatus = &gPartnerStatus;
469
470 if (N(IsPlayerHolding)) {
471 partnerStatus->npc = *watt;
472 partnerStatus->shouldResumeAbility = TRUE;
474 }
475
477}
478
479void N(post_battle)(Npc* watt) {
480 PartnerStatus* partnerStatus = &gPartnerStatus;
481
482 if (partnerStatus->shouldResumeAbility) {
483 *watt = partnerStatus->npc;
485 N(create_static_effect)(watt);
486 }
487}
488
489API_CALLABLE(N(EnterMap)) {
490 PartnerStatus* partnerStatus = &gPartnerStatus;
491 PlayerStatus* playerStatus = &gPlayerStatus;
493
494 if (isInitialCall) {
495 script->functionTemp[0] = 0;
496 }
497
498 switch (script->functionTemp[0]) {
499 case 0:
500 if (script->varTable[12] == 0) {
503 } else {
504 N(create_static_effect)(watt);
505 }
506
507 script->functionTemp[1] = script->varTable[4];
508 playerStatus->targetYaw = atan2(playerStatus->pos.x, playerStatus->pos.z,
509 script->varTable[1], script->varTable[3]);
510 playerStatus->heading = playerStatus->targetYaw;
511 move_player(script->functionTemp[1], playerStatus->heading, script->varTableF[5]);
513 watt->flags &= ~NPC_FLAG_GRAVITY;
518 partnerStatus->actingPartner = PARTNER_WATT;
519 N(D_802BE308) = FALSE;
520 script->functionTemp[0]++;
521 break;
522 case 1:
524 script->functionTemp[1]--;
525 if (script->functionTemp[1] == 0) {
526 if (script->varTable[12]) {
528 }
529 return ApiStatus_DONE2;
530 }
531 break;
532 }
533
534 return ApiStatus_BLOCK;
535}
536
538 PlayerStatus* playerStatus = &gPlayerStatus;
539 f32 currentSpeed = playerStatus->curSpeed;
540 AnimID anim;
541
542 if (playerStatus->runSpeed <= currentSpeed) {
543 anim = ANIM_MarioW1_CarryRun;
544 } else if (playerStatus->walkSpeed <= currentSpeed) {
545 anim = ANIM_MarioW1_CarryWalk;
546 } else {
547 anim = ANIM_MarioW1_CarryIdle;
548 }
550}
551
552void N(sync_held_position)(void) {
553 Npc* partnerNPC;
554 Npc* new_var2;
555 Camera* camera = gCameras;
556 PlayerStatus* playerStatus;
557 f32 offsetScale, angle;
558 f32 spriteFacingAngle;
559 s32 angleOffset;
560
562 spriteFacingAngle = gPlayerStatusPtr->spriteFacingAngle;
563 if ((spriteFacingAngle < 90.0f) || (spriteFacingAngle > 270.0f)) {
565 angleOffset = -5;
566 offsetScale = 0.6f;
567 } else {
568 angleOffset = 5;
569 offsetScale = 0.6f;
570 }
571 } else {
573 angleOffset = 5;
574 offsetScale = 0.6f;
575 } else {
576 angleOffset = -5;
577 offsetScale = 0.6f;
578 }
579 }
580
581 angle = DEG_TO_RAD(camera->curYaw + 270.0f - gPlayerStatusPtr->spriteFacingAngle + angleOffset);
582
583 playerStatus = gPlayerStatusPtr;
584 partnerNPC = wPartnerNpc;
585 partnerNPC->pos.x = playerStatus->pos.x + (sin_rad(angle) * gPlayerStatusPtr->colliderDiameter * offsetScale);
586
587 new_var2 = wPartnerNpc;
588 playerStatus = gPlayerStatusPtr;
589 partnerNPC = new_var2;
590 partnerNPC->pos.z = playerStatus->pos.z - (cos_rad(angle) * gPlayerStatusPtr->colliderDiameter * offsetScale);
591
594 }
595}
596
598 Call(N(EnterMap))
599 Return
600 End
601};
s32 partner_use_ability(void)
Definition partners.c:964
b8 keepUsingPartnerOnMapChange
s32 partnerUsedTime[12]
s32 b32
AnimID trueAnimation
Encoding back-facing sprite.
Bytecode EvtScript[]
u32 AnimID
#define clamp_angle
#define atan2
#define mem_clear
struct StaticStatusFXData * staticStatus
Definition effects.h:2579
EffectData data
Definition effects.h:2605
@ TWEESTER_PARTNER_HOLD
Definition enums.h:2477
@ TWEESTER_PARTNER_ATTRACT
Definition enums.h:2476
@ TWEESTER_PARTNER_INIT
Definition enums.h:2475
@ TWEESTER_PARTNER_RELEASE
Definition enums.h:2478
@ BUTTON_B
Definition enums.h:2789
@ NPC_PAL_ADJUST_NONE
Definition enums.h:1928
@ NPC_PAL_ADJUST_WATT_IDLE
Definition enums.h:1929
@ PS_FLAG_HIT_FIRE
Definition enums.h:3050
@ PARTNER_ACTION_WATT_SHINE
Definition enums.h:2940
@ PARTNER_ACTION_NONE
Definition enums.h:2932
@ PARTNER_ACTION_USE
Definition enums.h:2933
@ NPC_PARTNER
Definition enums.h:2528
@ PA_FLAG_WATT_IN_HANDS
Definition enums.h:3092
@ PA_FLAG_USING_WATT
Definition enums.h:3090
@ PA_FLAG_CHANGING_MAP
Definition enums.h:3112
@ PARTNER_NONE
Definition enums.h:2885
@ PARTNER_WATT
Definition enums.h:2891
@ ACTION_STATE_HIT_LAVA
Definition enums.h:2451
@ ACTION_STATE_IDLE
Definition enums.h:2426
@ ACTION_STATE_USE_SPINNING_FLOWER
Definition enums.h:2457
@ ACTION_STATE_LAND
Definition enums.h:2437
@ ACTION_STATE_WALK
Definition enums.h:2427
@ ACTION_STATE_RUN
Definition enums.h:2428
@ NPC_FLAG_FLYING
Definition enums.h:3001
@ NPC_FLAG_JUMPING
Definition enums.h:3009
@ NPC_FLAG_IGNORE_WORLD_COLLISION
Definition enums.h:3004
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
Definition enums.h:3006
@ NPC_FLAG_GRAVITY
Definition enums.h:3007
@ NPC_FLAG_INVISIBLE
Definition enums.h:2999
@ NPC_FLAG_IGNORE_CAMERA_FOR_YAW
Definition enums.h:3016
#define ApiStatus_DONE2
Definition evt.h:118
#define ApiStatus_DONE1
Definition evt.h:117
#define ApiStatus_BLOCK
Definition evt.h:116
f32 fabsf(f32 f)
void partner_clear_player_tracking(Npc *partner)
Definition partners.c:2436
void partner_flying_update_player_tracking(Npc *partner)
Definition partners.c:1751
f32 cos_rad(f32 x)
Definition 43F0.c:717
void move_player(s32 duration, f32 heading, f32 speed)
Definition 7BB60.c:57
f32 dist2D(f32 ax, f32 ay, f32 bx, f32 by)
Definition 43F0.c:670
void partner_kill_ability_script(void)
Definition partners.c:1109
s32 is_starting_conversation(void)
Definition encounter.c:2818
void set_action_state(s32 actionState)
Definition 7E9D0.c:209
void suggest_player_anim_allow_backward(AnimID anim)
Definition 77480.c:894
void partner_flying_update_motion(Npc *partner)
Definition partners.c:1777
void partner_flying_enable(Npc *partner, s32 val)
Definition partners.c:1706
f32 sin_rad(f32 x)
Definition 43F0.c:713
void sin_cos_rad(f32 rad, f32 *outSinTheta, f32 *outCosTheta)
Definition 43F0.c:706
void add_vec2D_polar(f32 *x, f32 *y, f32 r, f32 theta)
Definition 43F0.c:685
Npc * get_npc_unsafe(s32 npcID)
Definition npc.c:995
void npc_set_palswap_mode_A(Npc *npc, s32 arg1)
Definition npc.c:1258
s32 func_800EA52C(s32 partnerID)
Definition partners.c:537
s32 partner_init_get_out(Npc *npc)
Definition partners.c:2252
s32 partner_init_put_away(Npc *partner)
Definition partners.c:2178
s32 partner_put_away(Npc *partner)
Definition partners.c:2185
s32 partner_force_player_flip_done(void)
Definition partners.c:2454
s32 partner_get_out(Npc *partner)
Definition partners.c:2259
Npc * wPartnerNpc
Definition partners.c:43
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define BSS
Definition macros.h:7
#define DEG_TO_RAD(deg)
Definition macros.h:134
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define Return
Kills the current EVT thread.
Definition macros.h:217
@ SPRITE_ID_BACK_FACING
Definition sprite.h:13
s32 flags
f32 renderYaw
AnimID curAnim
Vec3f moveToPos
Vec3f pos
f32 moveSpeed
s16 duration
Entity * TweesterTouchingPartner
Definition 7B440.c:5
PlayerStatus * gPlayerStatusPtr
PartnerStatus gPartnerStatus
Definition partners.c:42
GameStatus * gGameStatusPtr
Definition main_loop.c:32
Camera gCameras[4]
Definition cam_main.c:17
PlayerData gPlayerData
Definition 77480.c:40
PlayerStatus gPlayerStatus
Definition 77480.c:39
void N try_cancel_tweester(Npc *watt)
Definition watt.c:214
EvtScript EVS_WorldWatt_PutAway
Definition watt.c:461
void N pre_battle(Npc *watt)
Definition watt.c:467
void N post_battle(Npc *watt)
Definition watt.c:479
void N update_player_carry_anim(void)
Definition watt.c:537
void N init(Npc *npc)
Definition watt.c:66
void N reset_static_effect(s32 type)
Definition watt.c:49
EvtScript EVS_WorldWatt_EnterMap
Definition watt.c:597
EvtScript EVS_WorldWatt_Update
Definition watt.c:208
EvtScript EVS_WorldWatt_UseAbility
Definition watt.c:433
void N sync_held_position(void)
Definition watt.c:552
@ SHINING_STATE_HOLDING
Definition watt.c:28
@ SHINING_STATE_BEGIN
Definition watt.c:26
@ SHINING_STATE_DELAY
Definition watt.c:25
@ SHINING_STATE_GATHER
Definition watt.c:27
@ SHINING_STATE_INIT
Definition watt.c:24
@ SHINING_STATE_RELEASE
Definition watt.c:29
void N dispose_static_effect(void)
Definition watt.c:40
EvtScript EVS_WorldWatt_TakeOut
Definition watt.c:90
void N create_static_effect(Npc *npc)
Definition watt.c:32
void force_player_anim(AnimID)
Definition 77480.c:905