Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
ToadHouseHos.data.inc.c
Go to the documentation of this file.
1#include "common.h"
2#include "sprite/npc/StarMan.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(8024AC14) = {
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(8024AC8C) = {
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
43EvtScript N(EVS_NpcInteract_ToadHouseKeeper) = {
44 Call(N(ToadHouse_InitScreenOverlay), 0, 0, 0)
45 ExecWait(N(EVS_ToadHouse_SetDialogue))
46 IfEq(LVar0, 0)
47 Return
48 EndIf
52 Call(N(ToadHouse_DoesPlayerNeedSleep))
53 IfEq(LVar1, 0)
55 EndIf
56 Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVar8)
57 Call(ShowChoice, MSG_Choice_0006)
58 Wait(3)
59 IfEq(LVar0, 1)
60 Call(ContinueSpeech, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVar9)
61 Return
62 EndIf
63 Call(ContinueSpeech, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVarA)
67 Call(N(ToadHouse_DisableStatusBar))
68 IfNe(LVar4, 0)
69 Exec(N(8024AC8C))
70 EndIf
71 Call(N(ToadHouse_PutPartnerAway), LVarA)
72 Wait(20)
73 ExecWait(N(EVS_ToadHouse_GetInBed))
74 Thread
75 Call(MakeLerp, 0, 255, 60, EASING_LINEAR)
76 Label(0)
78 Call(N(ToadHouse_UpdateScreenOverlay), 3, LVar0)
79 Wait(1)
80 IfEq(LVar1, 1)
81 Goto(0)
82 EndIf
85 IfNe(LVar4, 0)
86 Exec(N(8024AC14))
87 EndIf
88 Call(N(ToadHouse_GetPartnerBackOut), LVarA)
89 Wait(45)
90 Call(MakeLerp, 255, 0, 30, EASING_LINEAR)
91 Label(1)
93 Call(N(ToadHouse_UpdateScreenOverlay), 0, LVar0)
94 Wait(1)
95 IfEq(LVar1, 1)
96 Goto(1)
97 EndIf
99 Wait(105)
100 ExecWait(N(EVS_ToadHouse_ReturnFromRest))
103 Call(SpeakToPlayer, NPC_SELF, ANIM_StarMan_Talk, ANIM_StarMan_Idle, 0, LVarB)
104 Call(N(ToadHouse_ShowWorldStatusBar))
105 Return
106 End
107};
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