Paper Mario DX
Paper Mario (N64) modding
 
Loading...
Searching...
No Matches
evt.h File Reference

Go to the source code of this file.

Macros

#define MAKE_ENTITY_END   0x80000000
 
#define EVT_CONTINUE   0 /* Continue to next command */
 
#define EVT_ABORT   1 /* Quit execution */
 
#define EVT_FINISH   255 /* Return from script */
 
#define ApiStatus_BLOCK   0 /* Call again next frame */
 
#define ApiStatus_DONE1   1 /* Unconditional. Probably only exists to return a bool from functions */
 
#define ApiStatus_DONE2   2 /* Conditional on Evt->disableScripts */
 
#define ApiStatus_REPEAT   3 /* Call again immediately */
 
#define ApiStatus_FINISH   255 /* Corresponds to EVT_FINISH */
 

Typedefs

typedef s32 Bytecode
 
typedef s32 ApiStatus
 

Enumerations

enum  {
  EVT_OP_INTERNAL_FETCH , EVT_OP_END , EVT_OP_RETURN , EVT_OP_LABEL ,
  EVT_OP_GOTO , EVT_OP_LOOP , EVT_OP_END_LOOP , EVT_OP_BREAK_LOOP ,
  EVT_OP_WAIT_FRAMES , EVT_OP_WAIT_SECS , EVT_OP_IF_EQ , EVT_OP_IF_NE ,
  EVT_OP_IF_LT , EVT_OP_IF_GT , EVT_OP_IF_LE , EVT_OP_IF_GE ,
  EVT_OP_IF_FLAG , EVT_OP_IF_NOT_FLAG , EVT_OP_ELSE , EVT_OP_END_IF ,
  EVT_OP_SWITCH , EVT_OP_SWITCH_CONST , EVT_OP_CASE_EQ , EVT_OP_CASE_NE ,
  EVT_OP_CASE_LT , EVT_OP_CASE_GT , EVT_OP_CASE_LE , EVT_OP_CASE_GE ,
  EVT_OP_CASE_DEFAULT , EVT_OP_CASE_OR_EQ , EVT_OP_CASE_AND_EQ , EVT_OP_CASE_FLAG ,
  EVT_OP_END_CASE_GROUP , EVT_OP_CASE_RANGE , EVT_OP_BREAK_SWITCH , EVT_OP_END_SWITCH ,
  EVT_OP_SET , EVT_OP_SET_CONST , EVT_OP_SETF , EVT_OP_ADD ,
  EVT_OP_SUB , EVT_OP_MUL , EVT_OP_DIV , EVT_OP_MOD ,
  EVT_OP_ADDF , EVT_OP_SUBF , EVT_OP_MULF , EVT_OP_DIVF ,
  EVT_OP_USE_BUF , EVT_OP_BUF_READ1 , EVT_OP_BUF_READ2 , EVT_OP_BUF_READ3 ,
  EVT_OP_BUF_READ4 , EVT_OP_BUF_PEEK , EVT_OP_USE_FBUF , EVT_OP_FBUF_READ1 ,
  EVT_OP_FBUF_READ2 , EVT_OP_FBUF_READ3 , EVT_OP_FBUF_READ4 , EVT_OP_FBUF_PEEK ,
  EVT_OP_USE_ARRAY , EVT_OP_USE_FLAGS , EVT_OP_MALLOC_ARRAY , EVT_OP_BITWISE_AND ,
  EVT_OP_BITWISE_AND_CONST , EVT_OP_BITWISE_OR , EVT_OP_BITWISE_OR_CONST , EVT_OP_CALL ,
  EVT_OP_EXEC , EVT_OP_EXEC_GET_TID , EVT_OP_EXEC_WAIT , EVT_OP_BIND_TRIGGER ,
  EVT_OP_UNBIND , EVT_OP_KILL_THREAD , EVT_OP_JUMP , EVT_OP_SET_PRIORITY ,
  EVT_OP_SET_TIMESCALE , EVT_OP_SET_GROUP , EVT_OP_BIND_PADLOCK , EVT_OP_SUSPEND_GROUP ,
  EVT_OP_RESUME_GROUP , EVT_OP_SUSPEND_OTHERS , EVT_OP_RESUME_OTHERS , EVT_OP_SUSPEND_THREAD ,
  EVT_OP_RESUME_THREAD , EVT_OP_IS_THREAD_RUNNING , EVT_OP_THREAD , EVT_OP_END_THREAD ,
  EVT_OP_CHILD_THREAD , EVT_OP_END_CHILD_THREAD , EVT_OP_DEBUG_LOG , EVT_OP_DEBUG_PRINT_VAR ,
  EVT_OP_92 , EVT_OP_93 , EVT_OP_94
}
 
enum  EventCommandResults { EVT_CMD_RESULT_YIELD = -1 , EVT_CMD_RESULT_CONTINUE = 0 , EVT_CMD_RESULT_ERROR = 1 }
 
enum  EventGroupFlags {
  EVT_GROUP_FLAG_INTERACT = 0x01 , EVT_GROUP_FLAG_MENUS = 0x02 , EVT_GROUP_FLAG_CAM = 0x04 , EVT_GROUP_FLAG_UNUSED = 0x08 ,
  EVT_GROUP_FLAG_BATTLE = 0x10 , EVT_GROUP_NEVER_PAUSE = 0x00 , EVT_GROUP_PASSIVE_NPC = EVT_GROUP_FLAG_MENUS | EVT_GROUP_FLAG_UNUSED , EVT_GROUP_HOSTILE_NPC = EVT_GROUP_FLAG_INTERACT | EVT_GROUP_FLAG_MENUS | EVT_GROUP_FLAG_UNUSED ,
  EVT_GROUP_EXIT_MAP = EVT_GROUP_FLAG_INTERACT | EVT_GROUP_FLAG_MENUS | EVT_GROUP_FLAG_UNUSED | EVT_GROUP_FLAG_BATTLE , EVT_GROUP_SHAKE_CAM = EVT_GROUP_FLAG_CAM , EVT_GROUP_NOT_BATTLE = 0xFF & ~EVT_GROUP_FLAG_BATTLE
}
 
enum  EventPriority { EVT_PRIORITY_0 = 0x00 , EVT_PRIORITY_1 = 0x01 , EVT_PRIORITY_A = 0x0A , EVT_PRIORITY_14 = 0x14 }
 
enum  EventStateFlags {
  EVT_FLAG_ACTIVE = 0x01 , EVT_FLAG_PAUSED = 0x02 , EVT_FLAG_BLOCKED_BY_CHILD = 0x10 , EVT_FLAG_RUN_IMMEDIATELY = 0x20 ,
  EVT_FLAG_THREAD = 0x40 , EVT_FLAG_SUSPENDED = 0x80
}
 

Macro Definition Documentation

◆ MAKE_ENTITY_END

◆ EVT_CONTINUE

#define EVT_CONTINUE   0 /* Continue to next command */

Definition at line 110 of file evt.h.

◆ EVT_ABORT

#define EVT_ABORT   1 /* Quit execution */

Definition at line 111 of file evt.h.

◆ EVT_FINISH

#define EVT_FINISH   255 /* Return from script */

Definition at line 112 of file evt.h.

◆ ApiStatus_BLOCK

#define ApiStatus_BLOCK   0 /* Call again next frame */

◆ ApiStatus_DONE1

#define ApiStatus_DONE1   1 /* Unconditional. Probably only exists to return a bool from functions */

Definition at line 117 of file evt.h.

Referenced by _npc_jump_to(), evt_execute_next_command(), func_802C73B8(), and player_jump().

◆ ApiStatus_DONE2

#define ApiStatus_DONE2   2 /* Conditional on Evt->disableScripts */

Definition at line 118 of file evt.h.

Referenced by _npc_jump_to(), evt_execute_next_command(), evt_handle_add(), evt_handle_addF(), evt_handle_allocate_array(), evt_handle_AND(), evt_handle_AND_const(), evt_handle_bind(), evt_handle_bind_lock(), evt_handle_break_case(), evt_handle_break_loop(), evt_handle_case_AND(), evt_handle_case_default(), evt_handle_case_equal(), evt_handle_case_equal_AND(), evt_handle_case_equal_OR(), evt_handle_case_greater(), evt_handle_case_greater_equal(), evt_handle_case_less(), evt_handle_case_less_equal(), evt_handle_case_not_equal(), evt_handle_case_range(), evt_handle_child_thread(), evt_handle_debug_log(), evt_handle_divide(), evt_handle_divideF(), evt_handle_does_script_exist(), evt_handle_else(), evt_handle_end_case_group(), evt_handle_end_if(), evt_handle_end_loop(), evt_handle_end_switch(), evt_handle_exec1(), evt_handle_exec1_get_id(), evt_handle_get_1_float(), evt_handle_get_1_word(), evt_handle_get_2_float(), evt_handle_get_2_word(), evt_handle_get_3_float(), evt_handle_get_3_word(), evt_handle_get_4_float(), evt_handle_get_4_word(), evt_handle_get_Nth_float(), evt_handle_get_Nth_word(), evt_handle_goto(), evt_handle_if_AND(), evt_handle_if_equal(), evt_handle_if_greater(), evt_handle_if_greater_equal(), evt_handle_if_less(), evt_handle_if_less_equal(), evt_handle_if_not_AND(), evt_handle_if_not_equal(), evt_handle_jump(), evt_handle_kill(), evt_handle_label(), evt_handle_loop(), evt_handle_mod(), evt_handle_multiply(), evt_handle_multiplyF(), evt_handle_OR(), evt_handle_OR_const(), evt_handle_print_debug_var(), evt_handle_resume(), evt_handle_resume_all(), evt_handle_resume_others(), evt_handle_set_array(), evt_handle_set_const(), evt_handle_set_flag_array(), evt_handle_set_float(), evt_handle_set_float_buffer_ptr(), evt_handle_set_group(), evt_handle_set_int_buffer_ptr(), evt_handle_set_priority(), evt_handle_set_timescale(), evt_handle_set_var(), evt_handle_subtract(), evt_handle_subtractF(), evt_handle_suspend(), evt_handle_suspend_all(), evt_handle_suspend_others(), evt_handle_switch(), evt_handle_switch_const(), evt_handle_thread(), evt_handle_unbind(), evt_handle_wait(), evt_handle_wait_seconds(), func_802C739C(), func_802C73B0(), and SomeVtxFunc().

◆ ApiStatus_REPEAT

#define ApiStatus_REPEAT   3 /* Call again immediately */

Definition at line 119 of file evt.h.

Referenced by evt_execute_next_command().

◆ ApiStatus_FINISH

#define ApiStatus_FINISH   255 /* Corresponds to EVT_FINISH */

Typedef Documentation

◆ Bytecode

typedef s32 Bytecode

Definition at line 7 of file evt.h.

◆ ApiStatus

typedef s32 ApiStatus

Definition at line 115 of file evt.h.

Enumeration Type Documentation

◆ anonymous enum

anonymous enum
Enumerator
EVT_OP_INTERNAL_FETCH 
EVT_OP_END 
EVT_OP_RETURN 
EVT_OP_LABEL 

Args: index.

EVT_OP_GOTO 

Args: index.

EVT_OP_LOOP 

Args: number of repeats (0 = infinite)

EVT_OP_END_LOOP 
EVT_OP_BREAK_LOOP 
EVT_OP_WAIT_FRAMES 
EVT_OP_WAIT_SECS 
EVT_OP_IF_EQ 

Args: a, b.

EVT_OP_IF_NE 

Args: a, b.

EVT_OP_IF_LT 

Args: a, b.

EVT_OP_IF_GT 

Args: a, b.

EVT_OP_IF_LE 

Args: a, b.

EVT_OP_IF_GE 

Args: a, b.

EVT_OP_IF_FLAG 

Args: a, b.

EVT_OP_IF_NOT_FLAG 

Args: a, b.

EVT_OP_ELSE 
EVT_OP_END_IF 
EVT_OP_SWITCH 

Args: expression to test against.

EVT_OP_SWITCH_CONST 

Args: value to test against.

EVT_OP_CASE_EQ 

Args: expression to test for.

EVT_OP_CASE_NE 

Args: expression to test for.

EVT_OP_CASE_LT 

Args: expression to test for.

EVT_OP_CASE_GT 

Args: expression to test for.

EVT_OP_CASE_LE 

Args: expression to test for.

EVT_OP_CASE_GE 

Args: expression to test for.

EVT_OP_CASE_DEFAULT 
EVT_OP_CASE_OR_EQ 

Args: expression to test for.

EVT_OP_CASE_AND_EQ 

Args: expression to test for.

EVT_OP_CASE_FLAG 

Args: expression to test for.

EVT_OP_END_CASE_GROUP 

Ends the case block of EVT_OP_CASE_OR_EQ condition(s).

EVT_OP_CASE_RANGE 

Args: from, to.

EVT_OP_BREAK_SWITCH 
EVT_OP_END_SWITCH 
EVT_OP_SET 

Args: container, expression.

EVT_OP_SET_CONST 

Args: container, value.

EVT_OP_SETF 

Args: container, expression.

EVT_OP_ADD 

Args: container, expression to increment by.

EVT_OP_SUB 

Args: container, expression to decrement by.

EVT_OP_MUL 

Args: container, expression to multiply by.

EVT_OP_DIV 

Integer division. Args: container, expression to divide by.

EVT_OP_MOD 

Args: container, expression to divide by.

EVT_OP_ADDF 

Args: container, expression to increment by.

EVT_OP_SUBF 

Args: container, expression to decrement by.

EVT_OP_MULF 

Args: container, expression to multiply by.

EVT_OP_DIVF 

Args: container, expression to divide by.

EVT_OP_USE_BUF 

Args: s32*.

EVT_OP_BUF_READ1 
EVT_OP_BUF_READ2 

Args: container.

EVT_OP_BUF_READ3 

Args: container, container.

EVT_OP_BUF_READ4 

Args: container, container, container.

EVT_OP_BUF_PEEK 

Args: container, container, container, container.

Args: index, container

EVT_OP_USE_FBUF 

Identical to USE_BUFFER. Args: f32*.

EVT_OP_FBUF_READ1 
EVT_OP_FBUF_READ2 

Args: container.

EVT_OP_FBUF_READ3 

Args: container, container.

EVT_OP_FBUF_READ4 

Args: container, container, container.

EVT_OP_FBUF_PEEK 

Args: container, container, container, container.

Args: index, container

EVT_OP_USE_ARRAY 

Args: *s32.

EVT_OP_USE_FLAGS 

Args: *s32.

EVT_OP_MALLOC_ARRAY 

Allocates a new array. Args: length, s32*.

EVT_OP_BITWISE_AND 

Args: container, expression to bitwise AND with.

EVT_OP_BITWISE_AND_CONST 

Args: container, value to bitwise AND with.

EVT_OP_BITWISE_OR 

Args: container, expression to bitwise OR with.

EVT_OP_BITWISE_OR_CONST 

Args: container, value to bitwise OR with.

EVT_OP_CALL 

Args: *function, ...

EVT_OP_EXEC 

Args: EvtScript*.

EVT_OP_EXEC_GET_TID 

Args: EvtScript*, container.

EVT_OP_EXEC_WAIT 

Spawns a script and waits for it to return before continuing. Args: EvtScript*.

EVT_OP_BIND_TRIGGER 

Args: EvtScript*, trigger flags, s32 target, 1, Trigger*.

EVT_OP_UNBIND 

Unbinds any triggers bound to this script.

EVT_OP_KILL_THREAD 

Args: ScriptID.

EVT_OP_JUMP 

Args: EvtScript*.

EVT_OP_SET_PRIORITY 

Args: priority.

EVT_OP_SET_TIMESCALE 

Args: timescale.

EVT_OP_SET_GROUP 

Args: group.

EVT_OP_BIND_PADLOCK 

Args: EvtScript*, trigger flags, s32 target, ItemList*, 0, 1.

EVT_OP_SUSPEND_GROUP 

Args: group.

EVT_OP_RESUME_GROUP 

Args: group.

EVT_OP_SUSPEND_OTHERS 

Args: group.

EVT_OP_RESUME_OTHERS 

Args: group.

EVT_OP_SUSPEND_THREAD 

Args: ScriptID.

EVT_OP_RESUME_THREAD 

Args: ScriptID.

EVT_OP_IS_THREAD_RUNNING 

Args: ScriptID, container.

EVT_OP_THREAD 
EVT_OP_END_THREAD 
EVT_OP_CHILD_THREAD 

Parallel threads are killed as soon as the parent script returns.

EVT_OP_END_CHILD_THREAD 
EVT_OP_DEBUG_LOG 
EVT_OP_DEBUG_PRINT_VAR 

Args: expression.

EVT_OP_92 
EVT_OP_93 
EVT_OP_94 

Definition at line 9 of file evt.h.

9 {
102 EVT_OP_92,
103 EVT_OP_93,
104 EVT_OP_94,
105};
@ EVT_OP_LOOP
Args: number of repeats (0 = infinite)
Definition evt.h:15
@ EVT_OP_EXEC_GET_TID
Args: EvtScript*, container.
Definition evt.h:79
@ EVT_OP_CASE_DEFAULT
Definition evt.h:38
@ EVT_OP_END_IF
Definition evt.h:29
@ EVT_OP_INTERNAL_FETCH
Definition evt.h:10
@ EVT_OP_MOD
Args: container, expression to divide by.
Definition evt.h:53
@ EVT_OP_FBUF_READ2
Args: container.
Definition evt.h:66
@ EVT_OP_94
Definition evt.h:104
@ EVT_OP_93
Definition evt.h:103
@ EVT_OP_UNBIND
Unbinds any triggers bound to this script.
Definition evt.h:82
@ EVT_OP_ADDF
Args: container, expression to increment by.
Definition evt.h:54
@ EVT_OP_FBUF_READ3
Args: container, container.
Definition evt.h:67
@ EVT_OP_SET_PRIORITY
Args: priority.
Definition evt.h:85
@ EVT_OP_DIVF
Args: container, expression to divide by.
Definition evt.h:57
@ EVT_OP_CASE_FLAG
Args: expression to test for.
Definition evt.h:41
@ EVT_OP_ELSE
Definition evt.h:28
@ EVT_OP_DEBUG_LOG
Definition evt.h:100
@ EVT_OP_MULF
Args: container, expression to multiply by.
Definition evt.h:56
@ EVT_OP_SUSPEND_OTHERS
Args: group.
Definition evt.h:91
@ EVT_OP_SUSPEND_THREAD
Args: ScriptID.
Definition evt.h:93
@ EVT_OP_GOTO
Args: index.
Definition evt.h:14
@ EVT_OP_EXEC
Args: EvtScript*.
Definition evt.h:78
@ EVT_OP_USE_ARRAY
Args: *s32.
Definition evt.h:70
@ EVT_OP_MUL
Args: container, expression to multiply by.
Definition evt.h:51
@ EVT_OP_END_CASE_GROUP
Ends the case block of EVT_OP_CASE_OR_EQ condition(s).
Definition evt.h:42
@ EVT_OP_92
Definition evt.h:102
@ EVT_OP_IF_LE
Args: a, b.
Definition evt.h:24
@ EVT_OP_IF_FLAG
Args: a, b.
Definition evt.h:26
@ EVT_OP_WAIT_SECS
Definition evt.h:19
@ EVT_OP_END
Definition evt.h:11
@ EVT_OP_RETURN
Definition evt.h:12
@ EVT_OP_SET
Args: container, expression.
Definition evt.h:46
@ EVT_OP_IF_NE
Args: a, b.
Definition evt.h:21
@ EVT_OP_CASE_EQ
Args: expression to test for.
Definition evt.h:32
@ EVT_OP_BITWISE_OR_CONST
Args: container, value to bitwise OR with.
Definition evt.h:76
@ EVT_OP_BUF_READ1
Definition evt.h:59
@ EVT_OP_USE_FBUF
Identical to USE_BUFFER. Args: f32*.
Definition evt.h:64
@ EVT_OP_SETF
Args: container, expression.
Definition evt.h:48
@ EVT_OP_CHILD_THREAD
Parallel threads are killed as soon as the parent script returns.
Definition evt.h:98
@ EVT_OP_CASE_GE
Args: expression to test for.
Definition evt.h:37
@ EVT_OP_IF_GT
Args: a, b.
Definition evt.h:23
@ EVT_OP_CASE_OR_EQ
Args: expression to test for.
Definition evt.h:39
@ EVT_OP_END_CHILD_THREAD
Definition evt.h:99
@ EVT_OP_END_SWITCH
Definition evt.h:45
@ EVT_OP_DEBUG_PRINT_VAR
Args: expression.
Definition evt.h:101
@ EVT_OP_BUF_READ3
Args: container, container.
Definition evt.h:61
@ EVT_OP_DIV
Integer division. Args: container, expression to divide by.
Definition evt.h:52
@ EVT_OP_EXEC_WAIT
Spawns a script and waits for it to return before continuing. Args: EvtScript*.
Definition evt.h:80
@ EVT_OP_END_LOOP
Definition evt.h:16
@ EVT_OP_BUF_READ4
Args: container, container, container.
Definition evt.h:62
@ EVT_OP_ADD
Args: container, expression to increment by.
Definition evt.h:49
@ EVT_OP_FBUF_READ4
Args: container, container, container.
Definition evt.h:68
@ EVT_OP_BREAK_SWITCH
Definition evt.h:44
@ EVT_OP_SET_TIMESCALE
Args: timescale.
Definition evt.h:86
@ EVT_OP_USE_BUF
Args: s32*.
Definition evt.h:58
@ EVT_OP_BREAK_LOOP
Definition evt.h:17
@ EVT_OP_USE_FLAGS
Args: *s32.
Definition evt.h:71
@ EVT_OP_CASE_RANGE
Args: from, to.
Definition evt.h:43
@ EVT_OP_BITWISE_AND_CONST
Args: container, value to bitwise AND with.
Definition evt.h:74
@ EVT_OP_FBUF_READ1
Definition evt.h:65
@ EVT_OP_SUBF
Args: container, expression to decrement by.
Definition evt.h:55
@ EVT_OP_WAIT_FRAMES
Definition evt.h:18
@ EVT_OP_JUMP
Args: EvtScript*.
Definition evt.h:84
@ EVT_OP_THREAD
Definition evt.h:96
@ EVT_OP_CASE_AND_EQ
Args: expression to test for.
Definition evt.h:40
@ EVT_OP_SWITCH
Args: expression to test against.
Definition evt.h:30
@ EVT_OP_CASE_LE
Args: expression to test for.
Definition evt.h:36
@ EVT_OP_SUB
Args: container, expression to decrement by.
Definition evt.h:50
@ EVT_OP_IF_GE
Args: a, b.
Definition evt.h:25
@ EVT_OP_CALL
Args: *function, ...
Definition evt.h:77
@ EVT_OP_IF_NOT_FLAG
Args: a, b.
Definition evt.h:27
@ EVT_OP_IS_THREAD_RUNNING
Args: ScriptID, container.
Definition evt.h:95
@ EVT_OP_IF_LT
Args: a, b.
Definition evt.h:22
@ EVT_OP_SWITCH_CONST
Args: value to test against.
Definition evt.h:31
@ EVT_OP_CASE_NE
Args: expression to test for.
Definition evt.h:33
@ EVT_OP_SET_CONST
Args: container, value.
Definition evt.h:47
@ EVT_OP_KILL_THREAD
Args: ScriptID.
Definition evt.h:83
@ EVT_OP_LABEL
Args: index.
Definition evt.h:13
@ EVT_OP_RESUME_OTHERS
Args: group.
Definition evt.h:92
@ EVT_OP_RESUME_THREAD
Args: ScriptID.
Definition evt.h:94
@ EVT_OP_BUF_READ2
Args: container.
Definition evt.h:60
@ EVT_OP_END_THREAD
Definition evt.h:97
@ EVT_OP_RESUME_GROUP
Args: group.
Definition evt.h:90
@ EVT_OP_BIND_TRIGGER
Args: EvtScript*, trigger flags, s32 target, 1, Trigger*.
Definition evt.h:81
@ EVT_OP_BITWISE_AND
Args: container, expression to bitwise AND with.
Definition evt.h:73
@ EVT_OP_CASE_GT
Args: expression to test for.
Definition evt.h:35
@ EVT_OP_BITWISE_OR
Args: container, expression to bitwise OR with.
Definition evt.h:75
@ EVT_OP_SET_GROUP
Args: group.
Definition evt.h:87
@ EVT_OP_BIND_PADLOCK
Args: EvtScript*, trigger flags, s32 target, ItemList*, 0, 1.
Definition evt.h:88
@ EVT_OP_SUSPEND_GROUP
Args: group.
Definition evt.h:89
@ EVT_OP_CASE_LT
Args: expression to test for.
Definition evt.h:34
@ EVT_OP_MALLOC_ARRAY
Allocates a new array. Args: length, s32*.
Definition evt.h:72
@ EVT_OP_BUF_PEEK
Args: container, container, container, container.
Definition evt.h:63
@ EVT_OP_IF_EQ
Args: a, b.
Definition evt.h:20
@ EVT_OP_FBUF_PEEK
Args: container, container, container, container.
Definition evt.h:69

◆ EventCommandResults

Enumerator
EVT_CMD_RESULT_YIELD 
EVT_CMD_RESULT_CONTINUE 
EVT_CMD_RESULT_ERROR 

Definition at line 122 of file evt.h.

122 {
126};
@ EVT_CMD_RESULT_YIELD
Definition evt.h:123
@ EVT_CMD_RESULT_CONTINUE
Definition evt.h:124
@ EVT_CMD_RESULT_ERROR
Definition evt.h:125

◆ EventGroupFlags

Enumerator
EVT_GROUP_FLAG_INTERACT 
EVT_GROUP_FLAG_MENUS 
EVT_GROUP_FLAG_CAM 
EVT_GROUP_FLAG_UNUSED 
EVT_GROUP_FLAG_BATTLE 
EVT_GROUP_NEVER_PAUSE 
EVT_GROUP_PASSIVE_NPC 
EVT_GROUP_HOSTILE_NPC 
EVT_GROUP_EXIT_MAP 
EVT_GROUP_SHAKE_CAM 
EVT_GROUP_NOT_BATTLE 

Definition at line 131 of file evt.h.

131 {
132 // Each flag represents a distinct condition for suspending or resuming script execution.
133 // These flags are named based on the scenarios that trigger suspension.
134 EVT_GROUP_FLAG_INTERACT = 0x01, // Suspended during certain scenes, interactions, and NPC dialogue.
135 EVT_GROUP_FLAG_MENUS = 0x02, // Suspended when menus are open, during pause, item pickups, or "got item" scenes.
136 EVT_GROUP_FLAG_CAM = 0x04, // Never suspended; used exclusively with camera shake (ShakeCam) scripts.
137 EVT_GROUP_FLAG_UNUSED = 0x08, // Unused flag; its original purpose is unknown.
138 EVT_GROUP_FLAG_BATTLE = 0x10, // Suspended during battle entry and exit transitions.
139
140 // Combinations of flags used to assign specific behaviors to scripts.
141 // These groups are named after their most common script use-cases.
142 EVT_GROUP_NEVER_PAUSE = 0x00, // Never paused; default for map scripts derived from the main script, which always uses this group.
143 EVT_GROUP_PASSIVE_NPC = EVT_GROUP_FLAG_MENUS | EVT_GROUP_FLAG_UNUSED, // 0xA -- Pauses similar to passive NPC scripts.
144 EVT_GROUP_HOSTILE_NPC = EVT_GROUP_FLAG_INTERACT | EVT_GROUP_FLAG_MENUS | EVT_GROUP_FLAG_UNUSED, // 0xB -- Pauses similar to hostile NPC scripts; used for platforms, machinery, etc.
146 EVT_GROUP_SHAKE_CAM = EVT_GROUP_FLAG_CAM, // Only used by ShakeCam scripts.
147 EVT_GROUP_NOT_BATTLE = 0xFF & ~EVT_GROUP_FLAG_BATTLE, // 0xEF -- Pauses from anything except battles; default for scripts started via start_script, common in many battle scripts.
148};
@ EVT_GROUP_HOSTILE_NPC
Definition evt.h:144
@ EVT_GROUP_FLAG_BATTLE
Definition evt.h:138
@ EVT_GROUP_FLAG_MENUS
Definition evt.h:135
@ EVT_GROUP_NOT_BATTLE
Definition evt.h:147
@ EVT_GROUP_FLAG_INTERACT
Definition evt.h:134
@ EVT_GROUP_PASSIVE_NPC
Definition evt.h:143
@ EVT_GROUP_FLAG_CAM
Definition evt.h:136
@ EVT_GROUP_NEVER_PAUSE
Definition evt.h:142
@ EVT_GROUP_FLAG_UNUSED
Definition evt.h:137
@ EVT_GROUP_SHAKE_CAM
Definition evt.h:146
@ EVT_GROUP_EXIT_MAP
Definition evt.h:145

◆ EventPriority

Enumerator
EVT_PRIORITY_0 
EVT_PRIORITY_1 
EVT_PRIORITY_A 
EVT_PRIORITY_14 

Definition at line 150 of file evt.h.

150 {
151 EVT_PRIORITY_0 = 0x00, // map main script
152 EVT_PRIORITY_1 = 0x01,
153 EVT_PRIORITY_A = 0x0A,
154 EVT_PRIORITY_14 = 0x14,
155};
@ EVT_PRIORITY_14
Definition evt.h:154
@ EVT_PRIORITY_A
Definition evt.h:153
@ EVT_PRIORITY_1
Definition evt.h:152
@ EVT_PRIORITY_0
Definition evt.h:151

◆ EventStateFlags

Enumerator
EVT_FLAG_ACTIVE 
EVT_FLAG_PAUSED 

paused through suspend_group_script / resume_group_script

EVT_FLAG_BLOCKED_BY_CHILD 
EVT_FLAG_RUN_IMMEDIATELY 

don't wait for next update_scripts call

EVT_FLAG_THREAD 
EVT_FLAG_SUSPENDED 

doesn't affect child

Definition at line 157 of file evt.h.

157 {
158 EVT_FLAG_ACTIVE = 0x01,
159 EVT_FLAG_PAUSED = 0x02,
162 EVT_FLAG_THREAD = 0x40,
163 EVT_FLAG_SUSPENDED = 0x80,
164};
@ EVT_FLAG_ACTIVE
Definition evt.h:158
@ EVT_FLAG_PAUSED
paused through suspend_group_script / resume_group_script
Definition evt.h:159
@ EVT_FLAG_RUN_IMMEDIATELY
don't wait for next update_scripts call
Definition evt.h:161
@ EVT_FLAG_THREAD
Definition evt.h:162
@ EVT_FLAG_BLOCKED_BY_CHILD
Definition evt.h:160
@ EVT_FLAG_SUSPENDED
doesn't affect child
Definition evt.h:163