Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
ToadHouse.data.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "sprite/npc/Toad.h"
3
4// to use this include, you must also define these
5extern EvtScript N(EVS_ToadHouse_SetDialogue);
6extern EvtScript N(EVS_ToadHouse_ReturnFromRest);
7extern EvtScript N(EVS_ToadHouse_GetInBed);
8
9EvtScript N(EVS_ToadHouse_Unk1) = {
10 Call(EnableModel, LVar4, FALSE)
11 Call(EnableModel, LVar5, TRUE)
12 Call(RotateModel, LVar6, 0, 0, 0, 1)
13 Call(RotateModel, LVar7, 0, 0, 0, 1)
14 Return
15 End
16};
17
18EvtScript N(EVS_ToadHouse_Unk2) = {
23 Wait(70)
24 Call(EnableModel, LVar6, FALSE)
25 Thread
26 Wait(5)
27 Call(EnableModel, LVar6, TRUE)
29 Call(MakeLerp, 0, 180, 20, EASING_CUBIC_IN)
30 Label(1)
32 Call(RotateModel, LVar8, LVar0, 0, 0, -1)
33 Call(RotateModel, LVar9, LVar0, 0, 0, -1)
34 IfEq(LVar1, 1)
35 Wait(1)
36 Goto(1)
37 EndIf
38 Call(EnableModel, LVar7, FALSE)
39 Return
40 End
41};
42
43#ifndef ANIM_ShiverToad_Red_Talk
44#define ANIM_ShiverToad_Red_Talk ANIM_Toad_Red_Talk
45#endif
46
47#ifndef ANIM_ShiverToad_Red_Idle
48#define ANIM_ShiverToad_Red_Idle ANIM_Toad_Red_Idle
49#endif
50
51EvtScript N(EVS_NpcInteract_ToadHouseKeeper) = {
52 Call(N(ToadHouse_InitScreenOverlay), 0, 0, 0)
53 ExecWait(N(EVS_ToadHouse_SetDialogue))
54 IfEq(LVar0, 0)
55 Return
56 EndIf
60 Call(N(ToadHouse_DoesPlayerNeedSleep))
61 IfEq(LVar1, 0)
63 EndIf
65 Call(ShowChoice, MSG_Choice_0006)
66 Wait(3)
67 IfEq(LVar0, 1)
69 Return
70 EndIf
75 Call(N(ToadHouse_DisableStatusBar))
76 IfNe(LVar4, 0)
77 Exec(N(EVS_ToadHouse_Unk2))
78 EndIf
79 Call(N(ToadHouse_PutPartnerAway), LVarA)
80 Wait(20)
81 ExecWait(N(EVS_ToadHouse_GetInBed))
82 Thread
83 Call(MakeLerp, 0, 255, 60, EASING_LINEAR)
84 Label(0)
86 Call(N(ToadHouse_UpdateScreenOverlay), 3, LVar0)
87 Wait(1)
88 IfEq(LVar1, 1)
89 Goto(0)
90 EndIf
93 IfNe(LVar4, 0)
94 Exec(N(EVS_ToadHouse_Unk1))
95 EndIf
96 Call(N(ToadHouse_GetPartnerBackOut), LVarA)
97 Wait(45)
98 Call(MakeLerp, 255, 0, 30, EASING_LINEAR)
99 Label(1)
101 Call(N(ToadHouse_UpdateScreenOverlay), 0, LVar0)
102 Wait(1)
103 IfEq(LVar1, 1)
104 Goto(1)
105 EndIf
107 Wait(105)
108 ExecWait(N(EVS_ToadHouse_ReturnFromRest))
112 Call(N(ToadHouse_ShowWorldStatusBar))
113 Return
114 End
115};
#define ANIM_ShiverToad_Red_Idle
#define ANIM_ShiverToad_Red_Talk
Bytecode EvtScript[]
@ NPC_SELF
Definition enums.h:2526
@ EASING_CUBIC_IN
Definition enums.h:512
@ EASING_LINEAR
Definition enums.h:510
@ NPC_FLAG_IGNORE_PLAYER_COLLISION
Definition enums.h:3006
#define ContinueSpeech(ARGS...)
Definition msg_api.h:14
#define SpeakToPlayer(ARGS...)
Definition msg_api.h:6
ApiStatus EnableModel(Evt *script, b32 isInitialCall)
Enables or disables the given model.
ApiStatus RotateModel(Evt *script, b32 isInitialCall)
Rotates the model the given amount on the selected axis.
ApiStatus UpdateLerp(Evt *script, b32 isInitialCall)
ApiStatus SetPlayerJumpscale(Evt *script, b32 isInitialCall)
ApiStatus ShowChoice(Evt *script, b32 isInitialCall)
ApiStatus FullyRestoreSP(Evt *script, b32 isInitialCall)
ApiStatus FullyRestoreHPandFP(Evt *script, b32 isInitialCall)
ApiStatus DisablePlayerPhysics(Evt *script, b32 isInitialCall)
Disables player physics if disable is TRUE, enables it if FALSE.
ApiStatus MakeLerp(Evt *script, b32 isInitialCall)
ApiStatus SetNpcFlagBits(Evt *script, b32 isInitialCall)
#define LVar6
Definition macros.h:154
#define Set(VAR, INT_VALUE)
Sets the given variable to a given value casted to an integer.
Definition macros.h:365
#define IfNe(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR != RVAR.
Definition macros.h:272
#define End
Signals the end of EVT script data. A script missing this will likely crash on load.
Definition macros.h:213
#define Goto(LABEL_ID)
Moves execution to the given label.
Definition macros.h:232
#define Label(LABEL_ID)
Marks this point in the script as a Goto target.
Definition macros.h:227
#define EndIf
Marks the end of an if statement or an else block.
Definition macros.h:298
#define LVar5
Definition macros.h:153
#define LVarB
Definition macros.h:159
#define ExecWait(EVT_SOURCE)
Launches a new child thread.
Definition macros.h:475
#define LVar7
Definition macros.h:155
#define Thread
Marks the start of a thread block.
Definition macros.h:544
#define EndThread
Marks the end of a thread block.
Definition macros.h:547
#define LVar8
Definition macros.h:156
#define LVar2
Definition macros.h:150
#define LVar1
Definition macros.h:149
#define LVarA
Definition macros.h:158
#define Wait(NUM_FRAMES)
Blocks for the given number of frames.
Definition macros.h:254
#define LVar9
Definition macros.h:157
#define IfEq(LVAR, RVAR)
Marks the beginning of an if statement that only executes if LVAR == RVAR.
Definition macros.h:269
#define Call(FUNC, ARGS...)
Calls a given C EVT API function with any number of arguments.
Definition macros.h:576
#define LVar4
Definition macros.h:152
#define LVar3
Definition macros.h:151
#define LVar0
Definition macros.h:148
#define Exec(EVT_SOURCE)
Launches a new thread.
Definition macros.h:455
#define Return
Kills the current EVT thread.
Definition macros.h:217