mirror of
https://github.com/pmret/papermario.git
synced 2024-11-09 12:32:38 +01:00
Rename every function that is a part of evt_funcs.h to have the evt_ prefix (#408)
* rename every function that is part of evt_funcs.h to have the evtt_ prefix. * remove old .s files * fix symbol_addrs error * add evt_ 'prefix' to the dead functions in dead-h
This commit is contained in:
parent
3ed6f5b382
commit
b198250cde
@ -2,11 +2,11 @@
|
|||||||
#define _DEAD_H_
|
#define _DEAD_H_
|
||||||
|
|
||||||
#define gCameras dead_gCameras
|
#define gCameras dead_gCameras
|
||||||
#define get_variable dead_get_variable
|
#define evt_get_variable dead_evt_get_variable
|
||||||
#define set_variable dead_set_variable
|
#define evt_set_variable dead_evt_set_variable
|
||||||
#define get_float_variable dead_get_float_variable
|
#define evt_get_float_variable dead_evt_get_float_variable
|
||||||
#define cos_rad dead_cos_rad
|
#define cos_rad dead_cos_rad
|
||||||
#define set_float_variable dead_set_float_variable
|
#define evt_set_float_variable dead_evt_set_float_variable
|
||||||
#define playFX_11 dead_playFX_11
|
#define playFX_11 dead_playFX_11
|
||||||
#define gPlayerStatusPtr dead_gPlayerStatusPtr
|
#define gPlayerStatusPtr dead_gPlayerStatusPtr
|
||||||
#define set_main_pan_u dead_set_main_pan_u
|
#define set_main_pan_u dead_set_main_pan_u
|
||||||
|
@ -114,7 +114,7 @@ enum {
|
|||||||
#define EVT_SAVE_VAR(v) ((v - 170000000))
|
#define EVT_SAVE_VAR(v) ((v - 170000000))
|
||||||
#define EVT_ARRAY(v) ((v - 190000000))
|
#define EVT_ARRAY(v) ((v - 190000000))
|
||||||
#define EVT_ARRAY_FLAG(v) ((v - 210000000))
|
#define EVT_ARRAY_FLAG(v) ((v - 210000000))
|
||||||
#define EVT_FIXED(v) (((v * 1024.0f) + -230000000)) // See float_to_fixed_var
|
#define EVT_FIXED(v) (((v * 1024.0f) + -230000000)) // See evt_float_to_fixed_var
|
||||||
#define EVT_LIMIT -250000000 // TODO better name
|
#define EVT_LIMIT -250000000 // TODO better name
|
||||||
#define MAKE_ENTITY_END 0x80000000
|
#define MAKE_ENTITY_END 0x80000000
|
||||||
|
|
||||||
|
226
include/evt_funcs.h
Normal file
226
include/evt_funcs.h
Normal file
@ -0,0 +1,226 @@
|
|||||||
|
#ifndef _EVT_FUNCS_H_
|
||||||
|
#define _EVT_FUNCS_H_
|
||||||
|
|
||||||
|
f32 evt_fixed_var_to_float(Bytecode scriptVar);
|
||||||
|
|
||||||
|
Bytecode evt_float_to_fixed_var(f32 value);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_return(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_label(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_goto(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_loop(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_end_loop(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_break_loop(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_wait(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_wait_seconds(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_not_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_less(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_greater(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_less_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_greater_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_AND(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_if_not_AND(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_else(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_end_if(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_switch(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_switch_const(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_not_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_less(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_less_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_greater(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_greater_equal(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_range(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_default(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_AND(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_equal_OR(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_case_equal_AND(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_end_case_group(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_break_case(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_end_switch(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_var(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_const(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_float(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_add(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_subtract(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_multiply(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_divide(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_mod(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_addF(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_subtractF(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_multiplyF(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_divideF(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_int_buffer_ptr(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_float_buffer_ptr(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_1_word(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_2_word(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_3_word(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_4_word(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_Nth_word(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_1_float(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_2_float(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_3_float(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_4_float(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_get_Nth_float(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_array(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_flag_array(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_allocate_array(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_AND(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_AND_const(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_OR(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_OR_const(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_call(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_exec1(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_exec1_get_id(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_exec_wait(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_jump(Evt* script);
|
||||||
|
|
||||||
|
s32 evt_bound_script_trigger_handler(Trigger* trigger);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_bind(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus DeleteTrigger(Evt* script, s32 ievt_nitialCall);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_unbind(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_kill(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_priority(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_timescale(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_set_group(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_suspend_all(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_resume_all(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_suspend_others(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_resume_others(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_suspend(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_resume(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_does_script_exist(Evt* script);
|
||||||
|
|
||||||
|
void evt_standard_trigger_executor(Trigger* trigger);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_bind_lock(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_thread(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_end_thread(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_child_thread(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_end_child_thread(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus func_802C6E14(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus evt_handle_print_debug_var(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus func_802C739C(Evt* script);
|
||||||
|
|
||||||
|
ApiStatus func_802C73B0(Evt* script);
|
||||||
|
|
||||||
|
s32 func_802C73B8(Evt* script);
|
||||||
|
|
||||||
|
s32 evt_execute_next_command(Evt *script);
|
||||||
|
|
||||||
|
s32 evt_get_variable(Evt* script, Bytecode var);
|
||||||
|
|
||||||
|
s32 evt_get_variable_index(Evt* script, s32 var);
|
||||||
|
|
||||||
|
s32 evt_get_variable_index_alt(s32 var);
|
||||||
|
|
||||||
|
s32 evt_set_variable(Evt* script, Bytecode var, s32 value);
|
||||||
|
|
||||||
|
f32 evt_get_float_variable(Evt* script, Bytecode var);
|
||||||
|
|
||||||
|
f32 evt_set_float_variable(Evt* script, Bytecode var, s32 value);
|
||||||
|
|
||||||
|
Bytecode* evt_find_label(Evt* script, s32 arg1);
|
||||||
|
|
||||||
|
Bytecode* evt_skip_if(Evt* script);
|
||||||
|
|
||||||
|
Bytecode* evt_skip_else(Evt* script);
|
||||||
|
|
||||||
|
Bytecode* evt_goto_end_case(Evt* script);
|
||||||
|
|
||||||
|
Bytecode* evt_goto_next_case(Evt* script);
|
||||||
|
|
||||||
|
Bytecode* evt_goto_end_loop(Evt* script);
|
||||||
|
|
||||||
|
#endif
|
@ -157,7 +157,7 @@ void get_collider_center(s32 colliderID, f32* x, f32* y, f32* z);
|
|||||||
|
|
||||||
s32 is_trigger_bound(Trigger*, EvtSource* script);
|
s32 is_trigger_bound(Trigger*, EvtSource* script);
|
||||||
Trigger* create_trigger(TriggerDefinition* def);
|
Trigger* create_trigger(TriggerDefinition* def);
|
||||||
s32 _bound_script_trigger_handler(Trigger* trigger);
|
s32 evt_bound_script_trigger_handler(Trigger* trigger);
|
||||||
Trigger* get_trigger_by_id(s32 triggerID);
|
Trigger* get_trigger_by_id(s32 triggerID);
|
||||||
|
|
||||||
Actor* get_actor(ActorID actorID);
|
Actor* get_actor(ActorID actorID);
|
||||||
@ -170,10 +170,10 @@ void ai_enemy_play_sound(Npc* npc, s32 arg1, s32 arg2);
|
|||||||
|
|
||||||
s32 player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, s32, f32, s32*);
|
s32 player_test_move_without_slipping(PlayerStatus*, f32*, f32*, f32*, s32, f32, s32*);
|
||||||
|
|
||||||
s32 get_variable(Evt* script, Bytecode var);
|
s32 evt_get_variable(Evt* script, Bytecode var);
|
||||||
s32 set_variable(Evt* script, Bytecode var, s32 value);
|
s32 evt_set_variable(Evt* script, Bytecode var, s32 value);
|
||||||
f32 get_float_variable(Evt* script, Bytecode var);
|
f32 evt_get_float_variable(Evt* script, Bytecode var);
|
||||||
f32 set_float_variable(Evt* script, Bytecode var, f32 value);
|
f32 evt_set_float_variable(Evt* script, Bytecode var, f32 value);
|
||||||
void set_script_timescale(Evt* script, f32 timescale);
|
void set_script_timescale(Evt* script, f32 timescale);
|
||||||
f32 sin_deg(f32 x);
|
f32 sin_deg(f32 x);
|
||||||
f32 cos_deg(f32 x);
|
f32 cos_deg(f32 x);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
#ifndef _EVT_FUNCS_H_
|
#ifndef _EVT_FUNCS_H_
|
||||||
#define _EVT_FUNCS_H_
|
#define _EVT_FUNCS_H_
|
||||||
|
|
||||||
f32 fixed_var_to_float(Bytecode scriptVar);
|
f32 evt_fixed_var_to_float(Bytecode scriptVar);
|
||||||
|
|
||||||
Bytecode float_to_fixed_var(f32 value);
|
Bytecode evt_float_to_fixed_var(f32 value);
|
||||||
|
|
||||||
ApiStatus evt_handle_return(Evt* script);
|
ApiStatus evt_handle_return(Evt* script);
|
||||||
|
|
||||||
@ -145,7 +145,7 @@ ApiStatus evt_handle_exec_wait(Evt* script);
|
|||||||
|
|
||||||
ApiStatus evt_handle_jump(Evt* script);
|
ApiStatus evt_handle_jump(Evt* script);
|
||||||
|
|
||||||
s32 _bound_script_trigger_handler(Trigger* trigger);
|
s32 evt_bound_script_trigger_handler(Trigger* trigger);
|
||||||
|
|
||||||
ApiStatus evt_handle_bind(Evt* script);
|
ApiStatus evt_handle_bind(Evt* script);
|
||||||
|
|
||||||
@ -199,17 +199,17 @@ s32 func_802C73B8(Evt* script);
|
|||||||
|
|
||||||
s32 evt_execute_next_command(Evt *script);
|
s32 evt_execute_next_command(Evt *script);
|
||||||
|
|
||||||
s32 get_variable(Evt* script, Bytecode var);
|
s32 evt_get_variable(Evt* script, Bytecode var);
|
||||||
|
|
||||||
s32 get_variable_index(Evt* script, s32 var);
|
s32 evt_get_variable_index(Evt* script, s32 var);
|
||||||
|
|
||||||
s32 get_variable_index_alt(s32 var);
|
s32 evt_get_variable_index_alt(s32 var);
|
||||||
|
|
||||||
s32 set_variable(Evt* script, Bytecode var, s32 value);
|
s32 evt_set_variable(Evt* script, Bytecode var, s32 value);
|
||||||
|
|
||||||
f32 get_float_variable(Evt* script, Bytecode var);
|
f32 evt_get_float_variable(Evt* script, Bytecode var);
|
||||||
|
|
||||||
f32 set_float_variable(Evt* script, Bytecode var, s32 value);
|
f32 evt_set_float_variable(Evt* script, Bytecode var, s32 value);
|
||||||
|
|
||||||
Bytecode* evt_find_label(Evt* script, s32 arg1);
|
Bytecode* evt_find_label(Evt* script, s32 arg1);
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ void init_enter_world_shared(void) {
|
|||||||
|
|
||||||
gOverrideFlags |= 0x8;
|
gOverrideFlags |= 0x8;
|
||||||
|
|
||||||
set_variable(NULL, EVT_SAVE_VAR(1), gGameStatusPtr->unk_A9);
|
evt_set_variable(NULL, EVT_SAVE_VAR(1), gGameStatusPtr->unk_A9);
|
||||||
timeFreezeMode = 0;
|
timeFreezeMode = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
64
src/1776B0.c
64
src/1776B0.c
@ -249,7 +249,7 @@ ApiStatus UseBattleCamPreset(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
preset = get_variable(script, *args++);
|
preset = evt_get_variable(script, *args++);
|
||||||
D_8029F2A4 = 0;
|
D_8029F2A4 = 0;
|
||||||
btl_cam_use_preset(preset);
|
btl_cam_use_preset(preset);
|
||||||
|
|
||||||
@ -264,7 +264,7 @@ ApiStatus func_8024E664(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
preset = get_variable(script, *args++);
|
preset = evt_get_variable(script, *args++);
|
||||||
D_8029F2A4 = 1;
|
D_8029F2A4 = 1;
|
||||||
btl_cam_use_preset(preset);
|
btl_cam_use_preset(preset);
|
||||||
|
|
||||||
@ -284,7 +284,7 @@ ApiStatus func_8024E6B4(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
switch (script->functionTemp[0]) {
|
switch (script->functionTemp[0]) {
|
||||||
case 0:
|
case 0:
|
||||||
func_8024E40C(get_variable(script, *args++));
|
func_8024E40C(evt_get_variable(script, *args++));
|
||||||
script->functionTemp[0] = 1;
|
script->functionTemp[0] = 1;
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
@ -306,8 +306,8 @@ ApiStatus func_8024E748(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
mode = get_variable(script, *args++);
|
mode = evt_get_variable(script, *args++);
|
||||||
val = get_variable(script, *args++);
|
val = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
switch (mode) {
|
switch (mode) {
|
||||||
case 1:
|
case 1:
|
||||||
@ -346,14 +346,14 @@ ApiStatus func_8024E820(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
camera->unk_1C = get_variable(script, *args++);
|
camera->unk_1C = evt_get_variable(script, *args++);
|
||||||
camera->unk_1E = get_variable(script, *args++);
|
camera->unk_1E = evt_get_variable(script, *args++);
|
||||||
camera->unk_20 = get_variable(script, *args++);
|
camera->unk_20 = evt_get_variable(script, *args++);
|
||||||
camera->unk_22 = get_variable(script, *args++);
|
camera->unk_22 = evt_get_variable(script, *args++);
|
||||||
camera->unk_24 = get_variable(script, *args++);
|
camera->unk_24 = evt_get_variable(script, *args++);
|
||||||
camera->unk_26 = get_variable(script, *args++) * 256;
|
camera->unk_26 = evt_get_variable(script, *args++) * 256;
|
||||||
camera->unk_28 = get_variable(script, *args++);
|
camera->unk_28 = evt_get_variable(script, *args++);
|
||||||
camera->zoomPercent = get_variable(script, *args++);
|
camera->zoomPercent = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -365,9 +365,9 @@ ApiStatus SetBattleCamTarget(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F270 = get_variable(script, *args++);
|
D_8029F270 = evt_get_variable(script, *args++);
|
||||||
D_8029F274 = get_variable(script, *args++);
|
D_8029F274 = evt_get_variable(script, *args++);
|
||||||
D_8029F278 = get_variable(script, *args++);
|
D_8029F278 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -379,9 +379,9 @@ ApiStatus func_8024E9B0(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
camera->unk_54 = get_variable(script, *args++);
|
camera->unk_54 = evt_get_variable(script, *args++);
|
||||||
camera->unk_58 = get_variable(script, *args++);
|
camera->unk_58 = evt_get_variable(script, *args++);
|
||||||
camera->unk_5C = get_variable(script, *args++);
|
camera->unk_5C = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -393,7 +393,7 @@ ApiStatus SetBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F286 = get_variable(script, *args++);
|
D_8029F286 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -404,7 +404,7 @@ ApiStatus AddBattleCamOffsetZ(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F286 += get_variable(script, *args++);
|
D_8029F286 += evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -415,7 +415,7 @@ ApiStatus SetBattleCamYaw(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F282 = get_variable(script, *args++);
|
D_8029F282 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -427,7 +427,7 @@ ApiStatus BattleCamTargetActor(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
actorID = get_variable(script, *args++);
|
actorID = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
@ -446,13 +446,13 @@ ApiStatus func_8024EB84(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
actorID = get_variable(script, *args++);
|
actorID = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
func_8024E45C(actorID, get_variable(script, *args++));
|
func_8024E45C(actorID, evt_get_variable(script, *args++));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -465,7 +465,7 @@ ApiStatus MoveBattleCamOver(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F29E = get_variable(script, *args++);
|
D_8029F29E = evt_get_variable(script, *args++);
|
||||||
D_80280CE4 = 0;
|
D_80280CE4 = 0;
|
||||||
|
|
||||||
if (battleStatus->camMovementScript != NULL) {
|
if (battleStatus->camMovementScript != NULL) {
|
||||||
@ -482,7 +482,7 @@ ApiStatus SetBattleCamZoom(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F280 = get_variable(script, *args++);
|
D_8029F280 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -493,7 +493,7 @@ ApiStatus AddBattleCamZoom(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F280 += get_variable(script, *args++);
|
D_8029F280 += evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -504,14 +504,14 @@ ApiStatus func_8024ECF8(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
D_8029F2A2 = get_variable(script, *args++);
|
D_8029F2A2 = evt_get_variable(script, *args++);
|
||||||
D_8029F2A3 = get_variable(script, *args++);
|
D_8029F2A3 = evt_get_variable(script, *args++);
|
||||||
D_8029F2A5 = get_variable(script, *args++);
|
D_8029F2A5 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall) {
|
ApiStatus FreezeBattleCam(Evt* script, s32 isInitialCall) {
|
||||||
D_80280CE0 = get_variable(script, *script->ptrReadPos);
|
D_80280CE0 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -60,7 +60,7 @@ ApiStatus IsMessageBoxDisplayed(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 outVar = *args++;
|
s32 outVar = *args++;
|
||||||
|
|
||||||
set_variable(script, outVar, btl_is_popup_displayed());
|
evt_set_variable(script, outVar, btl_is_popup_displayed());
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
20
src/17FEB0.c
20
src/17FEB0.c
@ -51,7 +51,7 @@ ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
|
|||||||
battleStatus->currentAttackElement = *args++;
|
battleStatus->currentAttackElement = *args++;
|
||||||
battleStatus->currentAttackEventSuppression = 0;
|
battleStatus->currentAttackEventSuppression = 0;
|
||||||
battleStatus->currentAttackStatus = *args++;
|
battleStatus->currentAttackStatus = *args++;
|
||||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
|
||||||
a5 = *args++;
|
a5 = *args++;
|
||||||
|
|
||||||
if ((a5 & 0x30) == 0x30) {
|
if ((a5 & 0x30) == 0x30) {
|
||||||
@ -98,7 +98,7 @@ ApiStatus ItemDamageEnemy(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, itemDamageOut, itemDamage);
|
evt_set_variable(script, itemDamageOut, itemDamage);
|
||||||
if (!does_script_exist_by_ref(script)) {
|
if (!does_script_exist_by_ref(script)) {
|
||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
@ -118,8 +118,8 @@ ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
|
|||||||
battleStatus->currentAttackElement = *args++;
|
battleStatus->currentAttackElement = *args++;
|
||||||
battleStatus->currentAttackEventSuppression = 0;
|
battleStatus->currentAttackEventSuppression = 0;
|
||||||
battleStatus->currentAttackStatus = *args++;
|
battleStatus->currentAttackStatus = *args++;
|
||||||
battleStatus->currentAttackStatus |= get_variable(script, *args++);
|
battleStatus->currentAttackStatus |= evt_get_variable(script, *args++);
|
||||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
|
||||||
a5 = *args++;
|
a5 = *args++;
|
||||||
|
|
||||||
if ((a5 & 0x30) == 0x30) {
|
if ((a5 & 0x30) == 0x30) {
|
||||||
@ -166,7 +166,7 @@ ApiStatus ItemAfflictEnemy(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, itemDamageOut, itemDamage);
|
evt_set_variable(script, itemDamageOut, itemDamage);
|
||||||
if (!does_script_exist_by_ref(script)) {
|
if (!does_script_exist_by_ref(script)) {
|
||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
@ -185,8 +185,8 @@ ApiStatus func_80252B3C(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
battleStatus->currentAttackElement = *args++;
|
battleStatus->currentAttackElement = *args++;
|
||||||
battleStatus->currentAttackEventSuppression = 0;
|
battleStatus->currentAttackEventSuppression = 0;
|
||||||
battleStatus->currentAttackStatus = get_variable(script, *args++);
|
battleStatus->currentAttackStatus = evt_get_variable(script, *args++);
|
||||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
|
||||||
a5 = *args++;
|
a5 = *args++;
|
||||||
|
|
||||||
if ((a5 & 0x30) == 0x30) {
|
if ((a5 & 0x30) == 0x30) {
|
||||||
@ -233,7 +233,7 @@ ApiStatus func_80252B3C(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, itemDamageOut, itemDamage);
|
evt_set_variable(script, itemDamageOut, itemDamage);
|
||||||
if (!does_script_exist_by_ref(script)) {
|
if (!does_script_exist_by_ref(script)) {
|
||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
@ -253,7 +253,7 @@ ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) {
|
|||||||
battleStatus->currentAttackElement = *args++;
|
battleStatus->currentAttackElement = *args++;
|
||||||
battleStatus->currentAttackEventSuppression = 0;
|
battleStatus->currentAttackEventSuppression = 0;
|
||||||
battleStatus->currentAttackStatus = *args++;
|
battleStatus->currentAttackStatus = *args++;
|
||||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
|
||||||
a5 = *args++;
|
a5 = *args++;
|
||||||
|
|
||||||
if ((a5 & 0x30) == 0x30) {
|
if ((a5 & 0x30) == 0x30) {
|
||||||
@ -300,7 +300,7 @@ ApiStatus ItemCheckHit(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, itemDamageOut, itemDamage);
|
evt_set_variable(script, itemDamageOut, itemDamage);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
70
src/181810.c
70
src/181810.c
@ -25,11 +25,11 @@ ApiStatus ActorSpeak(Evt* script, s32 isInitialCall) {
|
|||||||
s32 stringID2;
|
s32 stringID2;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
stringID = get_variable(script, *args++);
|
stringID = evt_get_variable(script, *args++);
|
||||||
actorID = get_variable(script, *args++);
|
actorID = evt_get_variable(script, *args++);
|
||||||
partIndex = get_variable(script, *args++);
|
partIndex = evt_get_variable(script, *args++);
|
||||||
gSpeakingActorTalkAnim = get_variable(script, *args++);
|
gSpeakingActorTalkAnim = evt_get_variable(script, *args++);
|
||||||
gSpeakingActorIdleAnim = get_variable(script, *args++);
|
gSpeakingActorIdleAnim = evt_get_variable(script, *args++);
|
||||||
stringID2 = stringID;
|
stringID2 = stringID;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -114,7 +114,7 @@ ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
if (isInitialCall) {
|
if (isInitialCall) {
|
||||||
s32 stringID = get_variable(script, *args);
|
s32 stringID = evt_get_variable(script, *args);
|
||||||
|
|
||||||
script->functionTemp[1] = 0;
|
script->functionTemp[1] = 0;
|
||||||
D_8029FA64 = msg_get_printer_for_string(stringID, &script->functionTemp[1]);
|
D_8029FA64 = msg_get_printer_for_string(stringID, &script->functionTemp[1]);
|
||||||
@ -133,7 +133,7 @@ ApiStatus ShowBattleChoice(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802535B4(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802535B4(Evt* script, s32 isInitialCall) {
|
||||||
if (get_variable(script, *script->ptrReadPos)) {
|
if (evt_get_variable(script, *script->ptrReadPos)) {
|
||||||
decrement_status_menu_disabled();
|
decrement_status_menu_disabled();
|
||||||
} else {
|
} else {
|
||||||
increment_status_menu_disabled();
|
increment_status_menu_disabled();
|
||||||
@ -142,7 +142,7 @@ ApiStatus func_802535B4(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall) {
|
ApiStatus OverrideBattleDmaDest(Evt* script, s32 isInitialCall) {
|
||||||
gBattleDmaDest = get_variable(script, *script->ptrReadPos);
|
gBattleDmaDest = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -151,7 +151,7 @@ INCLUDE_ASM(s32, "181810", LoadBattleDmaData);
|
|||||||
ApiStatus func_802536A8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802536A8(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
|
||||||
if (get_variable(script, *script->ptrReadPos) != 0) {
|
if (evt_get_variable(script, *script->ptrReadPos) != 0) {
|
||||||
battleStatus->unk_92 |= 1;
|
battleStatus->unk_92 |= 1;
|
||||||
gOverrideFlags |= 0x80;
|
gOverrideFlags |= 0x80;
|
||||||
} else {
|
} else {
|
||||||
@ -165,7 +165,7 @@ ApiStatus func_802536A8(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_80253734(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80253734(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 val = get_variable(script, *script->ptrReadPos);
|
s32 val = evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
switch (val) {
|
switch (val) {
|
||||||
case 0:
|
case 0:
|
||||||
@ -202,15 +202,15 @@ ApiStatus func_802537C0(Evt* script, s32 isInitialCall) {
|
|||||||
t3 = 1;
|
t3 = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, a0, 1);
|
evt_set_variable(script, a0, 1);
|
||||||
set_variable(script, a1, t3);
|
evt_set_variable(script, a1, t3);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall) {
|
ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Bytecode soundID = *args++;
|
Bytecode soundID = *args++;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
@ -226,8 +226,8 @@ ApiStatus PlaySoundAtActor(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall) {
|
ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex = get_variable(script, *args++);
|
s32 partIndex = evt_get_variable(script, *args++);
|
||||||
Bytecode soundID = *args++;
|
Bytecode soundID = *args++;
|
||||||
ActorPart* part;
|
ActorPart* part;
|
||||||
|
|
||||||
@ -243,8 +243,8 @@ ApiStatus PlaySoundAtPart(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
|
ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 idx = get_variable(script, *args++);
|
s32 idx = evt_get_variable(script, *args++);
|
||||||
Bytecode soundID = *args++;
|
Bytecode soundID = *args++;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
@ -261,8 +261,8 @@ ApiStatus PlayLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
|
ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 idx = get_variable(script, *args++);
|
s32 idx = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -281,7 +281,7 @@ ApiStatus StopLoopingSoundAtActor(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall) {
|
ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall) {
|
||||||
if (get_variable(script, *script->ptrReadPos)) {
|
if (evt_get_variable(script, *script->ptrReadPos)) {
|
||||||
show_foreground_models_unchecked();
|
show_foreground_models_unchecked();
|
||||||
} else {
|
} else {
|
||||||
hide_foreground_models_unchecked();
|
hide_foreground_models_unchecked();
|
||||||
@ -290,7 +290,7 @@ ApiStatus SetForegroundModelsVisibleUnchecked(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall) {
|
ApiStatus SetForegroundModelsVisible(Evt* script, s32 isInitialCall) {
|
||||||
if (get_variable(script, *script->ptrReadPos)) {
|
if (evt_get_variable(script, *script->ptrReadPos)) {
|
||||||
show_foreground_models();
|
show_foreground_models();
|
||||||
} else {
|
} else {
|
||||||
hide_foreground_models();
|
hide_foreground_models();
|
||||||
@ -302,9 +302,9 @@ ApiStatus func_80253B30(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Bytecode a0 = *args++;
|
Bytecode a0 = *args++;
|
||||||
Bytecode a1 = *args++;
|
Bytecode a1 = *args++;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
set_variable(script, a0, (a1 | 0xFE) | (var1 * 256));
|
evt_set_variable(script, a0, (a1 | 0xFE) | (var1 * 256));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -312,10 +312,10 @@ ApiStatus MakeStatusField(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 outVar = *args++;
|
s32 outVar = *args++;
|
||||||
s32 a = *args++;
|
s32 a = *args++;
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
set_variable(script, outVar, a | 0x80000000 | (c << 8) | b);
|
evt_set_variable(script, outVar, a | 0x80000000 | (c << 8) | b);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -361,7 +361,7 @@ ApiStatus MultiplyByActorScale(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
|
|
||||||
set_float_variable(script, args[0], get_float_variable(script, args[0]) * actor->scalingFactor);
|
evt_set_float_variable(script, args[0], evt_get_float_variable(script, args[0]) * actor->scalingFactor);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -369,8 +369,8 @@ ApiStatus MultiplyVec2ByActorScale(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
|
|
||||||
set_float_variable(script, args[0], get_float_variable(script, args[0]) * actor->scalingFactor);
|
evt_set_float_variable(script, args[0], evt_get_float_variable(script, args[0]) * actor->scalingFactor);
|
||||||
set_float_variable(script, args[1], get_float_variable(script, args[1]) * actor->scalingFactor);
|
evt_set_float_variable(script, args[1], evt_get_float_variable(script, args[1]) * actor->scalingFactor);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -379,9 +379,9 @@ ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
|
|
||||||
set_float_variable(script, args[0], get_float_variable(script, args[0]) * actor->scalingFactor);
|
evt_set_float_variable(script, args[0], evt_get_float_variable(script, args[0]) * actor->scalingFactor);
|
||||||
set_float_variable(script, args[1], get_float_variable(script, args[1]) * actor->scalingFactor);
|
evt_set_float_variable(script, args[1], evt_get_float_variable(script, args[1]) * actor->scalingFactor);
|
||||||
set_float_variable(script, args[2], get_float_variable(script, args[2]) * actor->scalingFactor);
|
evt_set_float_variable(script, args[2], evt_get_float_variable(script, args[2]) * actor->scalingFactor);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -389,17 +389,17 @@ ApiStatus MultiplyVec3ByActorScale(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall) {
|
ApiStatus ApplyShrinkFromOwner(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
s32 amt = get_variable(script, *args);
|
s32 amt = evt_get_variable(script, *args);
|
||||||
|
|
||||||
if (actor->debuff == STATUS_SHRINK && amt > 0) {
|
if (actor->debuff == STATUS_SHRINK && amt > 0) {
|
||||||
amt /= 2;
|
amt /= 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, *args, amt);
|
evt_set_variable(script, *args, amt);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus StartRumble(Evt* script, s32 isInitialCall) {
|
ApiStatus StartRumble(Evt* script, s32 isInitialCall) {
|
||||||
start_rumble_type(get_variable(script, *script->ptrReadPos));
|
start_rumble_type(evt_get_variable(script, *script->ptrReadPos));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
34
src/18F340.c
34
src/18F340.c
@ -246,9 +246,9 @@ ApiStatus func_802613A8(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802613BC(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802613BC(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_6B(6, var1, var2 + 15, var3, 1.2f, 30);
|
playFX_6B(6, var1, var2 + 15, var3, 1.2f, 30);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -256,9 +256,9 @@ ApiStatus func_802613BC(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_80261478(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80261478(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_52(9, var1, var2 + 15, var3, 5.0f, 15);
|
playFX_52(9, var1, var2 + 15, var3, 5.0f, 15);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -397,9 +397,9 @@ ApiStatus HasMerleeCastsLeft(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802619E8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802619E8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 x = get_variable(script, *args++);
|
s32 x = evt_get_variable(script, *args++);
|
||||||
s32 y = get_variable(script, *args++);
|
s32 y = evt_get_variable(script, *args++);
|
||||||
s32 z = get_variable(script, *args++);
|
s32 z = evt_get_variable(script, *args++);
|
||||||
s32 screenX;
|
s32 screenX;
|
||||||
s32 screenY;
|
s32 screenY;
|
||||||
s32 screenZ;
|
s32 screenZ;
|
||||||
@ -434,10 +434,10 @@ ApiStatus func_80261B40(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus FXRecoverHP(Evt* script, s32 isInitialCall) {
|
ApiStatus FXRecoverHP(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, var1, var2, var3, var4);
|
playFX_40(0, var1, var2, var3, var4);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -445,10 +445,10 @@ ApiStatus FXRecoverHP(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus FXRecoverFP(Evt* script, s32 isInitialCall) {
|
ApiStatus FXRecoverFP(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, var1, var2, var3, var4);
|
playFX_40(1, var1, var2, var3, var4);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
40
src/196AA0.c
40
src/196AA0.c
@ -6,7 +6,7 @@ extern void* actionCommandDmaTable[23];
|
|||||||
extern s32 D_8029FBC0;
|
extern s32 D_8029FBC0;
|
||||||
|
|
||||||
ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) {
|
ApiStatus LoadActionCommand(Evt* script, s32 isInitialCall) {
|
||||||
s32 cmd = get_variable(script, *script->ptrReadPos);
|
s32 cmd = evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
dma_copy(actionCommandDmaTable[cmd * 3], actionCommandDmaTable[cmd * 3 + 1], actionCommandDmaTable[cmd * 3 + 2]);
|
dma_copy(actionCommandDmaTable[cmd * 3], actionCommandDmaTable[cmd * 3 + 1], actionCommandDmaTable[cmd * 3 + 2]);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -292,39 +292,39 @@ INCLUDE_ASM(void, "196AA0", func_80269118);
|
|||||||
INCLUDE_ASM(s32, "196AA0", func_80269160);
|
INCLUDE_ASM(s32, "196AA0", func_80269160);
|
||||||
|
|
||||||
ApiStatus func_8026919C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8026919C(Evt* script, s32 isInitialCall) {
|
||||||
gBattleStatus.unk_434 = get_variable(script, *script->ptrReadPos);
|
gBattleStatus.unk_434 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetupMashMeter(Evt* script, s32 isInitialCall) {
|
ApiStatus SetupMashMeter(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
gActionCommandStatus.mashMeterIntervals = get_variable(script, *args++);
|
gActionCommandStatus.mashMeterIntervals = evt_get_variable(script, *args++);
|
||||||
gActionCommandStatus.mashMeterCutoffs[1] = get_variable(script, *args++);
|
gActionCommandStatus.mashMeterCutoffs[1] = evt_get_variable(script, *args++);
|
||||||
gActionCommandStatus.mashMeterCutoffs[2] = get_variable(script, *args++);
|
gActionCommandStatus.mashMeterCutoffs[2] = evt_get_variable(script, *args++);
|
||||||
gActionCommandStatus.mashMeterCutoffs[3] = get_variable(script, *args++);
|
gActionCommandStatus.mashMeterCutoffs[3] = evt_get_variable(script, *args++);
|
||||||
gActionCommandStatus.mashMeterCutoffs[4] = get_variable(script, *args++);
|
gActionCommandStatus.mashMeterCutoffs[4] = evt_get_variable(script, *args++);
|
||||||
gActionCommandStatus.mashMeterCutoffs[5] = get_variable(script, *args++);
|
gActionCommandStatus.mashMeterCutoffs[5] = evt_get_variable(script, *args++);
|
||||||
gActionCommandStatus.mashMeterCutoffs[0] = gActionCommandStatus.mashMeterCutoffs[1] / 2;
|
gActionCommandStatus.mashMeterCutoffs[0] = gActionCommandStatus.mashMeterCutoffs[1] / 2;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetActionSuccess(Evt* script, s32 isInitialCall) {
|
ApiStatus GetActionSuccess(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetActionSuccess(Evt* script, s32 isInitialCall) {
|
ApiStatus SetActionSuccess(Evt* script, s32 isInitialCall) {
|
||||||
gBattleStatus.actionSuccess = get_variable(script, *script->ptrReadPos);
|
gBattleStatus.actionSuccess = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetActionCommandMode(Evt* script, s32 isInitialCall) {
|
ApiStatus SetActionCommandMode(Evt* script, s32 isInitialCall) {
|
||||||
gBattleStatus.unk_83 = get_variable(script, *script->ptrReadPos);
|
gBattleStatus.unk_83 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetActionCommandMode(Evt* script, s32 isInitialCall) {
|
ApiStatus GetActionCommandMode(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.unk_83);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_83);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -346,41 +346,41 @@ INCLUDE_ASM(s32, "196AA0", func_80269470);
|
|||||||
INCLUDE_ASM(s32, "196AA0", func_802694A4);
|
INCLUDE_ASM(s32, "196AA0", func_802694A4);
|
||||||
|
|
||||||
ApiStatus GetActionSuccessCopy(Evt* script, s32 isInitialCall) {
|
ApiStatus GetActionSuccessCopy(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.actionSuccess);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80269524(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80269524(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.unk_86);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_86);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80269550(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80269550(Evt* script, s32 isInitialCall) {
|
||||||
gBattleStatus.unk_86 = get_variable(script, *script->ptrReadPos);
|
gBattleStatus.unk_86 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetBlockResult(Evt* script, s32 isInitialCall) {
|
ApiStatus GetBlockResult(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.blockResult);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.blockResult);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetActionResult(Evt* script, s32 isInitialCall) {
|
ApiStatus GetActionResult(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.unk_84);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_84);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetActionResult(Evt* script, s32 isInitialCall) {
|
ApiStatus SetActionResult(Evt* script, s32 isInitialCall) {
|
||||||
gBattleStatus.unk_84 = get_variable(script, *script->ptrReadPos);
|
gBattleStatus.unk_84 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80269600(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80269600(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.unk_85);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.unk_85);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_8026962C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8026962C(Evt* script, s32 isInitialCall) {
|
||||||
gBattleStatus.unk_85 = get_variable(script, *script->ptrReadPos);
|
gBattleStatus.unk_85 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
548
src/197F40.c
548
src/197F40.c
File diff suppressed because it is too large
Load Diff
16
src/19FAF0.c
16
src/19FAF0.c
@ -105,9 +105,9 @@ ApiStatus GetMenuSelection(Evt* script, s32 isInitialCall) {
|
|||||||
s32 outVar2 = *args++;
|
s32 outVar2 = *args++;
|
||||||
s32 outVar3 = *args++;
|
s32 outVar3 = *args++;
|
||||||
|
|
||||||
set_variable(script, outVar1, battleStatus->moveCategory);
|
evt_set_variable(script, outVar1, battleStatus->moveCategory);
|
||||||
set_variable(script, outVar2, battleStatus->selectedItemID);
|
evt_set_variable(script, outVar2, battleStatus->selectedItemID);
|
||||||
set_variable(script, outVar3, battleStatus->selectedMoveID);
|
evt_set_variable(script, outVar3, battleStatus->selectedMoveID);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -169,7 +169,7 @@ INCLUDE_ASM(s32, "19FAF0", PlayerRunToGoal, Evt* script, s32 isInitialCall);
|
|||||||
INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal, Evt* script, s32 isInitialCall);
|
INCLUDE_ASM(s32, "19FAF0", CancelablePlayerRunToGoal, Evt* script, s32 isInitialCall);
|
||||||
|
|
||||||
ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall) {
|
ApiStatus GetPlayerHP(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gPlayerData.curHP);
|
evt_set_variable(script, *script->ptrReadPos, gPlayerData.curHP);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -182,7 +182,7 @@ INCLUDE_ASM(s32, "19FAF0", PlayerTestEnemy, Evt* script, s32 isInitialCall);
|
|||||||
ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) {
|
ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
if (dispatch_damage_event_player_0(get_variable(script, *args++), *args++) < 0) {
|
if (dispatch_damage_event_player_0(evt_get_variable(script, *args++), *args++) < 0) {
|
||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -194,7 +194,7 @@ ApiStatus DispatchDamagePlayerEvent(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) {
|
ApiStatus EnablePlayerBlur(Evt* script, s32 isInitialCall) {
|
||||||
s32 setting = get_variable(script, *script->ptrReadPos);
|
s32 setting = evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
if (setting == 0) {
|
if (setting == 0) {
|
||||||
disable_player_blur();
|
disable_player_blur();
|
||||||
@ -237,7 +237,7 @@ ApiStatus DidActionSucceed(Evt* script, s32 isInitialCall) {
|
|||||||
actionSucceeded = actionSuccess;
|
actionSucceeded = actionSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, actionSucceeded);
|
evt_set_variable(script, outVar, actionSucceeded);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -247,6 +247,6 @@ ApiStatus func_80276EFC(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus DispatchEventPlayer(Evt* script, s32 isInitialCall) {
|
ApiStatus DispatchEventPlayer(Evt* script, s32 isInitialCall) {
|
||||||
dispatch_event_player(get_variable(script, *script->ptrReadPos));
|
dispatch_event_player(evt_get_variable(script, *script->ptrReadPos));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
194
src/1A5830.c
194
src/1A5830.c
@ -797,47 +797,47 @@ s32 dispatch_damage_event_actor_1(Actor* actor, s32 damageAmount, s32 event) {
|
|||||||
|
|
||||||
ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall) {
|
ApiStatus BindTakeTurn(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
EvtSource* takeTurnScript;
|
EvtSource* takeTurnScript;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
takeTurnScript = (EvtSource*) get_variable(script, *args++);
|
takeTurnScript = (EvtSource*) evt_get_variable(script, *args++);
|
||||||
get_actor(actorID)->takeTurnScriptSource = takeTurnScript;
|
get_actor(actorID)->takeTurnScriptSource = takeTurnScript;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall) {
|
ApiStatus PauseTakeTurn(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_variable(script, *args++);
|
evt_get_variable(script, *args++);
|
||||||
suspend_all_script(get_actor(actorID)->takeTurnID);
|
suspend_all_script(get_actor(actorID)->takeTurnID);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall) {
|
ApiStatus ResumeTakeTurn(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
get_variable(script, *args++);
|
evt_get_variable(script, *args++);
|
||||||
resume_all_script(get_actor(actorID)->takeTurnID);
|
resume_all_script(get_actor(actorID)->takeTurnID);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus BindIdle(Evt* script, s32 isInitialCall) {
|
ApiStatus BindIdle(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
EvtSource* idleCode;
|
EvtSource* idleCode;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
Evt* newScriptContext;
|
Evt* newScriptContext;
|
||||||
@ -846,7 +846,7 @@ ApiStatus BindIdle(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
idleCode = (EvtSource*) get_variable(script, *args++);
|
idleCode = (EvtSource*) evt_get_variable(script, *args++);
|
||||||
actor = get_actor(actorID);
|
actor = get_actor(actorID);
|
||||||
|
|
||||||
if (actor->idleScript != 0) {
|
if (actor->idleScript != 0) {
|
||||||
@ -864,7 +864,7 @@ ApiStatus BindIdle(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
|
ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 var1;
|
s32 var1;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
@ -872,7 +872,7 @@ ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
var1 = get_variable(script, *args++);
|
var1 = evt_get_variable(script, *args++);
|
||||||
actor = get_actor(actorID);
|
actor = get_actor(actorID);
|
||||||
|
|
||||||
if (actor->idleScript != NULL) {
|
if (actor->idleScript != NULL) {
|
||||||
@ -895,28 +895,28 @@ ApiStatus EnableIdleScript(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) {
|
ApiStatus BindHandleEvent(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
EvtSource* var1;
|
EvtSource* var1;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
var1 = (EvtSource*) get_variable(script, *args++);
|
var1 = (EvtSource*) evt_get_variable(script, *args++);
|
||||||
get_actor(actorID)->onHitScriptSource = var1;
|
get_actor(actorID)->onHitScriptSource = var1;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus BindNextTurn(Evt* script, s32 isInitialCall) {
|
ApiStatus BindNextTurn(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
EvtSource* var1;
|
EvtSource* var1;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
var1 = (EvtSource*) get_variable(script, *args++);
|
var1 = (EvtSource*) evt_get_variable(script, *args++);
|
||||||
get_actor(actorID)->onTurnChanceScriptSource = var1;
|
get_actor(actorID)->onTurnChanceScriptSource = var1;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -938,7 +938,7 @@ ApiStatus LandJump(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (script->functionTemp[0] == 0) {
|
if (script->functionTemp[0] == 0) {
|
||||||
s32 actorID = get_variable(script, *args++);
|
s32 actorID = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
@ -994,7 +994,7 @@ INCLUDE_ASM(s32, "1A5830", FlyPartTo);
|
|||||||
|
|
||||||
ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) {
|
ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -1002,13 +1002,13 @@ ApiStatus GetLastEvent(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
outVar = *args++;
|
outVar = *args++;
|
||||||
set_variable(script, outVar, get_actor(actorID)->lastEventType);
|
evt_set_variable(script, outVar, get_actor(actorID)->lastEventType);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) {
|
ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 targetActorID;
|
s32 targetActorID;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
@ -1016,7 +1016,7 @@ ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
targetActorID = get_variable(script, *args++);
|
targetActorID = evt_get_variable(script, *args++);
|
||||||
actor = get_actor(actorID);
|
actor = get_actor(actorID);
|
||||||
actor->targetActorID = targetActorID;
|
actor->targetActorID = targetActorID;
|
||||||
actor->targetPartIndex = 1;
|
actor->targetPartIndex = 1;
|
||||||
@ -1025,7 +1025,7 @@ ApiStatus SetTargetActor(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) {
|
ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s8 newHP;
|
s8 newHP;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
@ -1033,7 +1033,7 @@ ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
newHP = get_variable(script, *args++);
|
newHP = evt_get_variable(script, *args++);
|
||||||
actor = get_actor(actorID);
|
actor = get_actor(actorID);
|
||||||
|
|
||||||
actor->currentHP = newHP;
|
actor->currentHP = newHP;
|
||||||
@ -1049,7 +1049,7 @@ ApiStatus SetEnemyHP(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus GetActorHP(Evt* script, s32 isInitialCall) {
|
ApiStatus GetActorHP(Evt* script, s32 isInitialCall) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
s32 outVal;
|
s32 outVal;
|
||||||
@ -1073,13 +1073,13 @@ ApiStatus GetActorHP(Evt* script, s32 isInitialCall) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, outVal);
|
evt_set_variable(script, outVar, outVal);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) {
|
ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -1087,7 +1087,7 @@ ApiStatus GetEnemyMaxHP(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
outVar = *args++;
|
outVar = *args++;
|
||||||
set_variable(script, outVar, get_actor(actorID)->maxHP);
|
evt_set_variable(script, outVar, get_actor(actorID)->maxHP);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1097,7 +1097,7 @@ ApiStatus RemoveActor(Evt* script, s32 isInitialCall) {
|
|||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
EncounterStatus* currentEncounter = &gCurrentEncounter;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
s32 i;
|
s32 i;
|
||||||
|
|
||||||
@ -1135,7 +1135,7 @@ ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) {
|
|||||||
f32 ntd;
|
f32 ntd;
|
||||||
s32 numToDrop;
|
s32 numToDrop;
|
||||||
|
|
||||||
actorID = get_variable(script, *args++);
|
actorID = evt_get_variable(script, *args++);
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.enemyID;
|
actorID = script->owner1.enemyID;
|
||||||
}
|
}
|
||||||
@ -1183,7 +1183,7 @@ ApiStatus DropStarPoints(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) {
|
ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex;
|
s32 partIndex;
|
||||||
u32* var2;
|
u32* var2;
|
||||||
|
|
||||||
@ -1191,29 +1191,29 @@ ApiStatus SetDefenseTable(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
partIndex = get_variable(script, *args++);
|
partIndex = evt_get_variable(script, *args++);
|
||||||
var2 = (u32*) get_variable(script, *args++);
|
var2 = (u32*) evt_get_variable(script, *args++);
|
||||||
get_actor_part(get_actor(actorID), partIndex)->defenseTable = var2;
|
get_actor_part(get_actor(actorID), partIndex)->defenseTable = var2;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) {
|
ApiStatus SetStatusTable(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
u32* var1;
|
u32* var1;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
var1 = (u32*) get_variable(script, *args++);
|
var1 = (u32*) evt_get_variable(script, *args++);
|
||||||
get_actor(actorID)->statusTable = var1;
|
get_actor(actorID)->statusTable = var1;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) {
|
ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex;
|
s32 partIndex;
|
||||||
u32* var2;
|
u32* var2;
|
||||||
|
|
||||||
@ -1221,26 +1221,26 @@ ApiStatus SetIdleAnimations(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
partIndex = get_variable(script, *args++);
|
partIndex = evt_get_variable(script, *args++);
|
||||||
var2 = (u32*) get_variable(script, *args++);
|
var2 = (u32*) evt_get_variable(script, *args++);
|
||||||
get_actor_part(get_actor(actorID), partIndex)->idleAnimations = var2;
|
get_actor_part(get_actor(actorID), partIndex)->idleAnimations = var2;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex;
|
s32 partIndex;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
partIndex = get_variable(script, *args++);
|
partIndex = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
// weirdly unused
|
// weirdly unused
|
||||||
get_variable(script, *args++);
|
evt_get_variable(script, *args++);
|
||||||
get_variable(script, *args++);
|
evt_get_variable(script, *args++);
|
||||||
|
|
||||||
get_actor_part(get_actor(actorID), partIndex);
|
get_actor_part(get_actor(actorID), partIndex);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -1249,7 +1249,7 @@ ApiStatus func_8027CC10(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
|
ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
s32 hitResult;
|
s32 hitResult;
|
||||||
@ -1266,7 +1266,7 @@ ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
|
|||||||
battleStatus->currentAttackElement = *args++;
|
battleStatus->currentAttackElement = *args++;
|
||||||
battleStatus->currentAttackEventSuppression = *args++;
|
battleStatus->currentAttackEventSuppression = *args++;
|
||||||
battleStatus->currentAttackStatus = *args++;
|
battleStatus->currentAttackStatus = *args++;
|
||||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
|
||||||
battleFlagsModifier = *args++;
|
battleFlagsModifier = *args++;
|
||||||
|
|
||||||
if (battleFlagsModifier & 0x10) {
|
if (battleFlagsModifier & 0x10) {
|
||||||
@ -1313,7 +1313,7 @@ ApiStatus EnemyDamageTarget(Evt *script, s32 isInitialCall) {
|
|||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, hitResult);
|
evt_set_variable(script, outVar, hitResult);
|
||||||
if (!(does_script_exist_by_ref(script))) {
|
if (!(does_script_exist_by_ref(script))) {
|
||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
@ -1326,7 +1326,7 @@ ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) {
|
|||||||
BattleStatus* anotherBattleStatus = &gBattleStatus;
|
BattleStatus* anotherBattleStatus = &gBattleStatus;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
s32 actorID = get_variable(script, *args++);
|
s32 actorID = evt_get_variable(script, *args++);
|
||||||
s32 hitResults;
|
s32 hitResults;
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
|
|
||||||
@ -1352,7 +1352,7 @@ ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, hitResults);
|
evt_set_variable(script, outVar, hitResults);
|
||||||
if (does_script_exist_by_ref(script) == NULL) {
|
if (does_script_exist_by_ref(script) == NULL) {
|
||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
@ -1362,7 +1362,7 @@ ApiStatus EnemyFollowupAfflictTarget(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus EnemyTestTarget(Evt *script, s32 isInitialCall) {
|
ApiStatus EnemyTestTarget(Evt *script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Actor *actor;
|
Actor *actor;
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
s32 hitResult;
|
s32 hitResult;
|
||||||
@ -1379,7 +1379,7 @@ ApiStatus EnemyTestTarget(Evt *script, s32 isInitialCall) {
|
|||||||
battleStatus->currentAttackElement = *args++;
|
battleStatus->currentAttackElement = *args++;
|
||||||
battleStatus->currentAttackEventSuppression = 0;
|
battleStatus->currentAttackEventSuppression = 0;
|
||||||
battleStatus->currentAttackStatus = *args++;
|
battleStatus->currentAttackStatus = *args++;
|
||||||
battleStatus->currentAttackDamage = get_variable(script, *args++);
|
battleStatus->currentAttackDamage = evt_get_variable(script, *args++);
|
||||||
battleFlagsModifier = *args++;
|
battleFlagsModifier = *args++;
|
||||||
|
|
||||||
if (battleFlagsModifier & 0x10) {
|
if (battleFlagsModifier & 0x10) {
|
||||||
@ -1426,14 +1426,14 @@ ApiStatus EnemyTestTarget(Evt *script, s32 isInitialCall) {
|
|||||||
return ApiStatus_FINISH;
|
return ApiStatus_FINISH;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, hitResult);
|
evt_set_variable(script, outVar, hitResult);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
|
ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
s32 damageAmount;
|
s32 damageAmount;
|
||||||
s32 scriptExists;
|
s32 scriptExists;
|
||||||
@ -1443,9 +1443,9 @@ ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
actor = get_actor(actorID);
|
actor = get_actor(actorID);
|
||||||
damageAmount = get_variable(script, *args++);
|
damageAmount = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (dispatch_damage_event_actor_0(actor, damageAmount, get_variable(script, *args++)) < 0) {
|
if (dispatch_damage_event_actor_0(actor, damageAmount, evt_get_variable(script, *args++)) < 0) {
|
||||||
return ApiStatus_BLOCK;
|
return ApiStatus_BLOCK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1455,18 +1455,18 @@ ApiStatus DispatchDamageEvent(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus DispatchEvent(Evt* script, s32 isInitialCall) {
|
ApiStatus DispatchEvent(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
dispatch_event_actor(get_actor(actorID), get_variable(script, *args++));
|
dispatch_event_actor(get_actor(actorID), evt_get_variable(script, *args++));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_8027D2D8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8027D2D8(Evt* script, s32 isInitialCall) {
|
||||||
ActorID actorID = get_variable(script, *script->ptrReadPos);
|
ActorID actorID = evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
@ -1477,7 +1477,7 @@ ApiStatus func_8027D2D8(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_8027D32C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8027D32C(Evt* script, s32 isInitialCall) {
|
||||||
ActorID actorID = get_variable(script, *script->ptrReadPos);
|
ActorID actorID = evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
@ -1489,7 +1489,7 @@ ApiStatus func_8027D32C(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) {
|
ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex;
|
s32 partIndex;
|
||||||
ActorPart* part;
|
ActorPart* part;
|
||||||
s32 x;
|
s32 x;
|
||||||
@ -1499,11 +1499,11 @@ ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
partIndex = get_variable(script, *args++);
|
partIndex = evt_get_variable(script, *args++);
|
||||||
part = get_actor_part(get_actor(actorID), partIndex);
|
part = get_actor_part(get_actor(actorID), partIndex);
|
||||||
|
|
||||||
x = get_variable(script, *args++);
|
x = evt_get_variable(script, *args++);
|
||||||
y = get_variable(script, *args++);
|
y = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
part->targetOffset.x = x;
|
part->targetOffset.x = x;
|
||||||
part->targetOffset.y = y;
|
part->targetOffset.y = y;
|
||||||
@ -1513,7 +1513,7 @@ ApiStatus SetTargetOffset(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_8027D434(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8027D434(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex;
|
s32 partIndex;
|
||||||
ActorPart* part;
|
ActorPart* part;
|
||||||
|
|
||||||
@ -1521,15 +1521,15 @@ ApiStatus func_8027D434(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
partIndex = get_variable(script, *args++);
|
partIndex = evt_get_variable(script, *args++);
|
||||||
part = get_actor_part(get_actor(actorID), partIndex);
|
part = get_actor_part(get_actor(actorID), partIndex);
|
||||||
part->unk_70 = get_variable(script, *args++);
|
part->unk_70 = evt_get_variable(script, *args++);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_8027D4C8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8027D4C8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex;
|
s32 partIndex;
|
||||||
ActorPart* part;
|
ActorPart* part;
|
||||||
s32 temp;
|
s32 temp;
|
||||||
@ -1539,11 +1539,11 @@ ApiStatus func_8027D4C8(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
partIndex = get_variable(script, *args++);
|
partIndex = evt_get_variable(script, *args++);
|
||||||
part = get_actor_part(get_actor(actorID), partIndex);
|
part = get_actor_part(get_actor(actorID), partIndex);
|
||||||
|
|
||||||
temp = get_variable(script, *args++);
|
temp = evt_get_variable(script, *args++);
|
||||||
temp2 = get_variable(script, *args++);
|
temp2 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
part->unk_75 = temp;
|
part->unk_75 = temp;
|
||||||
part->unk_76 = temp2;
|
part->unk_76 = temp2;
|
||||||
@ -1553,8 +1553,8 @@ ApiStatus func_8027D4C8(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) {
|
ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 enable = get_variable(script, *args++);
|
s32 enable = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -1574,7 +1574,7 @@ ApiStatus EnableActorBlur(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_8027D628(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8027D628(Evt* script, s32 isInitialCall) {
|
||||||
ActorID actorID = get_variable(script, *script->ptrReadPos);
|
ActorID actorID = evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
@ -1586,14 +1586,14 @@ ApiStatus func_8027D628(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus AfflictActor(Evt* script, s32 isInitialCall) {
|
ApiStatus AfflictActor(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
s32 statusTypeKey;
|
s32 statusTypeKey;
|
||||||
s32 duration;
|
s32 duration;
|
||||||
s32 statusDurationKey;
|
s32 statusDurationKey;
|
||||||
|
|
||||||
statusTypeKey = get_variable(script, *args++);
|
statusTypeKey = evt_get_variable(script, *args++);
|
||||||
duration = get_variable(script, *args++);
|
duration = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
@ -1625,19 +1625,19 @@ ApiStatus AfflictActor(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_8027D75C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8027D75C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outVar = *args++;
|
s32 outVar = *args++;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, get_actor(actorID)->unk_208);
|
evt_set_variable(script, outVar, get_actor(actorID)->unk_208);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetEncounterState(Evt* script, s32 isInitialCall) {
|
ApiStatus GetEncounterState(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitType);
|
evt_set_variable(script, *script->ptrReadPos, gCurrentEncounter.hitType);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1648,9 +1648,9 @@ ApiStatus YieldTurn(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus SetActorSize(Evt* script, s32 isInitialCall) {
|
ApiStatus SetActorSize(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 y = get_variable(script, *args++);
|
s32 y = evt_get_variable(script, *args++);
|
||||||
s32 x = get_variable(script, *args++);
|
s32 x = evt_get_variable(script, *args++);
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -1672,7 +1672,7 @@ ApiStatus SetActorSize(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus GetActorSize(Evt* script, s32 isInitialCall) {
|
ApiStatus GetActorSize(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outY = *args++;
|
s32 outY = *args++;
|
||||||
s32 outX = *args++;
|
s32 outX = *args++;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
@ -1682,17 +1682,17 @@ ApiStatus GetActorSize(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
actor = get_actor(actorID);
|
actor = get_actor(actorID);
|
||||||
set_variable(script, outY, actor->size.y);
|
evt_set_variable(script, outY, actor->size.y);
|
||||||
set_variable(script, outX, actor->size.x);
|
evt_set_variable(script, outX, actor->size.x);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus SetPartSize(Evt* script, s32 isInitialCall) {
|
ApiStatus SetPartSize(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 partIndex = get_variable(script, *args++);
|
s32 partIndex = evt_get_variable(script, *args++);
|
||||||
s32 sizeY = get_variable(script, *args++);
|
s32 sizeY = evt_get_variable(script, *args++);
|
||||||
s32 sizeX = get_variable(script, *args++);
|
s32 sizeX = evt_get_variable(script, *args++);
|
||||||
ActorPart* part;
|
ActorPart* part;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -1716,33 +1716,33 @@ ApiStatus SetPartSize(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall) {
|
ApiStatus GetOriginalActorType(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outVar = *args++;
|
s32 outVar = *args++;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, get_actor(actorID)->staticActorData->type);
|
evt_set_variable(script, outVar, get_actor(actorID)->staticActorData->type);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall) {
|
ApiStatus GetCurrentActorType(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outVar = *args++;
|
s32 outVar = *args++;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, outVar, get_actor(actorID)->actorType);
|
evt_set_variable(script, outVar, get_actor(actorID)->actorType);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) {
|
ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -1750,13 +1750,13 @@ ApiStatus GetLastDamage(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
outVar = *args++;
|
outVar = *args++;
|
||||||
|
|
||||||
set_variable(script, outVar, get_actor(actorID)->lastDamageTaken);
|
evt_set_variable(script, outVar, get_actor(actorID)->lastDamageTaken);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) {
|
ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 flag;
|
s32 flag;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
@ -1764,7 +1764,7 @@ ApiStatus EnableActorGlow(Evt* script, s32 isInitialCall) {
|
|||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
flag = get_variable(script, *args++);
|
flag = evt_get_variable(script, *args++);
|
||||||
actor = get_actor(actorID);
|
actor = get_actor(actorID);
|
||||||
actor->isGlowing = flag;
|
actor->isGlowing = flag;
|
||||||
|
|
||||||
@ -1788,14 +1788,14 @@ ApiStatus WasStatusInflicted(Evt* script, s32 isInitialCall) {
|
|||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 outVal;
|
s32 outVal;
|
||||||
|
|
||||||
get_variable(script, *args++);
|
evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (script) { // can be args or script but not 1 or do while 0, nor does else work after
|
if (script) { // can be args or script but not 1 or do while 0, nor does else work after
|
||||||
outVal = battleStatus->wasStatusInflicted;
|
outVal = battleStatus->wasStatusInflicted;
|
||||||
}
|
}
|
||||||
outVal = battleStatus->wasStatusInflicted;
|
outVal = battleStatus->wasStatusInflicted;
|
||||||
|
|
||||||
set_variable(script, *args++, outVal);
|
evt_set_variable(script, *args++, outVal);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -1807,13 +1807,13 @@ ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) {
|
|||||||
Actor* actorTo;
|
Actor* actorTo;
|
||||||
Actor* actorFrom;
|
Actor* actorFrom;
|
||||||
|
|
||||||
actorIDFrom = get_variable(script, *args++);
|
actorIDFrom = evt_get_variable(script, *args++);
|
||||||
if (actorIDFrom == ACTOR_SELF) {
|
if (actorIDFrom == ACTOR_SELF) {
|
||||||
actorIDFrom = script->owner1.actorID;
|
actorIDFrom = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
actorFrom = get_actor(actorIDFrom);
|
actorFrom = get_actor(actorIDFrom);
|
||||||
|
|
||||||
actorIDTo = get_variable(script, *args++);
|
actorIDTo = evt_get_variable(script, *args++);
|
||||||
if (actorIDTo == ACTOR_SELF) {
|
if (actorIDTo == ACTOR_SELF) {
|
||||||
actorIDTo = script->owner1.actorID;
|
actorIDTo = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
@ -1833,7 +1833,7 @@ ApiStatus CopyStatusEffects(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) {
|
ApiStatus ClearStatusEffects(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 flag;
|
s32 flag;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
|
|
||||||
|
20
src/1AC760.c
20
src/1AC760.c
@ -127,8 +127,8 @@ ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall) {
|
|||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
s32 numTargets = actor->targetListLength;
|
s32 numTargets = actor->targetListLength;
|
||||||
s8* targetList = &actor->targetIndexList;
|
s8* targetList = &actor->targetIndexList;
|
||||||
s32 arg1 = get_variable(script, *args++);
|
s32 arg1 = evt_get_variable(script, *args++);
|
||||||
s32 arg2 = get_variable(script, *args++);
|
s32 arg2 = evt_get_variable(script, *args++);
|
||||||
s32 otherArg = *args++;
|
s32 otherArg = *args++;
|
||||||
SelectableTarget* selectableTarget;
|
SelectableTarget* selectableTarget;
|
||||||
|
|
||||||
@ -148,7 +148,7 @@ ApiStatus MakeOwnerTargetIndex(Evt* script, s32 isInitialCall) {
|
|||||||
actor->targetPartIndex = selectableTarget->partID;
|
actor->targetPartIndex = selectableTarget->partID;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, otherArg, arg2);
|
evt_set_variable(script, otherArg, arg2);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -159,7 +159,7 @@ ApiStatus func_8027FC90(Evt* script, s32 isInitialCall) {
|
|||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 hitResult;
|
s32 hitResult;
|
||||||
Actor* actor;
|
Actor* actor;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
s32 outVar;
|
s32 outVar;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -173,14 +173,14 @@ ApiStatus func_8027FC90(Evt* script, s32 isInitialCall) {
|
|||||||
hitResult = calc_partner_damage_enemy();
|
hitResult = calc_partner_damage_enemy();
|
||||||
show_damage_popup(actor->walk.goalPos.x, actor->walk.goalPos.y, actor->walk.goalPos.z, battleStatus->lastAttackDamage,
|
show_damage_popup(actor->walk.goalPos.x, actor->walk.goalPos.y, actor->walk.goalPos.z, battleStatus->lastAttackDamage,
|
||||||
0);
|
0);
|
||||||
set_variable(script, outVar, hitResult);
|
evt_set_variable(script, outVar, hitResult);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) {
|
ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ActorID actorID = get_variable(script, *args++);
|
ActorID actorID = evt_get_variable(script, *args++);
|
||||||
Bytecode* outVar;
|
Bytecode* outVar;
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
@ -188,7 +188,7 @@ ApiStatus GetActorLevel(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
outVar = *args++;
|
outVar = *args++;
|
||||||
set_variable(script, outVar, get_actor(actorID)->staticActorData->level);
|
evt_set_variable(script, outVar, get_actor(actorID)->staticActorData->level);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
@ -205,8 +205,8 @@ ApiStatus func_8028070C(Evt* script, s32 isInitialCall) {
|
|||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
s32 damageAmount = get_variable(script, *args++);
|
s32 damageAmount = evt_get_variable(script, *args++);
|
||||||
s32 event = get_variable(script, *args++);
|
s32 event = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
battleStatus->currentTargetID = actor->targetActorID;
|
battleStatus->currentTargetID = actor->targetActorID;
|
||||||
battleStatus->currentTargetPart = actor->targetPartIndex;
|
battleStatus->currentTargetPart = actor->targetPartIndex;
|
||||||
@ -239,7 +239,7 @@ ApiStatus GetActionCommandResult(Evt* script, s32 isInitialCall) {
|
|||||||
outVal = actionSuccess;
|
outVal = actionSuccess;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, var, outVal);
|
evt_set_variable(script, var, outVal);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -16,11 +16,11 @@ ApiStatus GetDamageIntensity(Evt* script, s32 isInitialCall) {
|
|||||||
// TODO: Rename to AddEffectOffset
|
// TODO: Rename to AddEffectOffset
|
||||||
ApiStatus AddEffectOffset(Evt* script, s32 isInitialCall) {
|
ApiStatus AddEffectOffset(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
EffectInstance* effect = get_variable(script, *args++);
|
EffectInstance* effect = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
effect->data->pos.x += get_variable(script, *args++);
|
effect->data->pos.x += evt_get_variable(script, *args++);
|
||||||
effect->data->pos.y += get_variable(script, *args++);
|
effect->data->pos.y += evt_get_variable(script, *args++);
|
||||||
effect->data->pos.z += get_variable(script, *args++);
|
effect->data->pos.z += evt_get_variable(script, *args++);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -194,9 +194,9 @@ ApiStatus HasMerleeCasts(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall) {
|
ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_6B(6, var0, var1, var2, 1.2f, 30);
|
playFX_6B(6, var0, var1, var2, 1.2f, 30);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -204,9 +204,9 @@ ApiStatus PlayMerleeGatherFX(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall) {
|
ApiStatus PlayMerleeOrbFX(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_52(9, var0, var1, var2, 5.0f, 15);
|
playFX_52(9, var0, var1, var2, 5.0f, 15);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
28
src/3251D0.c
28
src/3251D0.c
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
ApiStatus func_802BD100_3251D0(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802BD100_3251D0(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_11(0, a, b, c, 60.0f);
|
playFX_11(0, a, b, c, 60.0f);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -13,10 +13,10 @@ ApiStatus func_802BD100_3251D0(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802BD1AC_32527C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802BD1AC_32527C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -24,10 +24,10 @@ ApiStatus func_802BD1AC_32527C(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802BD26C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802BD26C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, a, b, c, d);
|
playFX_40(1, a, b, c, d);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -36,7 +36,7 @@ ApiStatus func_802BD26C(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_802BD32C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802BD32C(Evt* script, s32 isInitialCall) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
s32 newHP = playerData->curHP + get_variable(script, *script->ptrReadPos);
|
s32 newHP = playerData->curHP + evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
if (newHP > playerData->curMaxHP) {
|
if (newHP > playerData->curMaxHP) {
|
||||||
newHP = playerData->curMaxHP;
|
newHP = playerData->curMaxHP;
|
||||||
@ -53,7 +53,7 @@ ApiStatus func_802BD32C(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_802BD388(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802BD388(Evt* script, s32 isInitialCall) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
s32 newFP = playerData->curFP + get_variable(script, *script->ptrReadPos);
|
s32 newFP = playerData->curFP + evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
if (newFP > playerData->curMaxFP) {
|
if (newFP > playerData->curMaxFP) {
|
||||||
newFP = playerData->curMaxFP;
|
newFP = playerData->curMaxFP;
|
||||||
@ -80,7 +80,7 @@ ApiStatus func_802BD41C(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_802BD458(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802BD458(Evt* script, s32 isInitialCall) {
|
||||||
s32 itemIdx = get_variable(script, *script->ptrReadPos);
|
s32 itemIdx = evt_get_variable(script, *script->ptrReadPos);
|
||||||
s32 var15;
|
s32 var15;
|
||||||
|
|
||||||
script->varTable[11] = (&gItemTable[itemIdx])->potencyA;
|
script->varTable[11] = (&gItemTable[itemIdx])->potencyA;
|
||||||
|
@ -65,7 +65,7 @@ void check_input_status_menu(void) {
|
|||||||
PlayerStatus* playerStatus = &gPlayerStatus;
|
PlayerStatus* playerStatus = &gPlayerStatus;
|
||||||
s32 pressedButtons;
|
s32 pressedButtons;
|
||||||
|
|
||||||
if (get_variable(NULL, EVT_STORY_PROGRESS) < STORY_EPILOGUE) {
|
if (evt_get_variable(NULL, EVT_STORY_PROGRESS) < STORY_EPILOGUE) {
|
||||||
if (playerStatus->actionState != ACTION_STATE_RIDE) {
|
if (playerStatus->actionState != ACTION_STATE_RIDE) {
|
||||||
pressedButtons = playerStatus->pressedButtons;
|
pressedButtons = playerStatus->pressedButtons;
|
||||||
} else {
|
} else {
|
||||||
|
@ -554,7 +554,7 @@ void func_800E96C8(void) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus ShowCoinCounter(Evt* script, s32 isInitialCall) {
|
ApiStatus ShowCoinCounter(Evt* script, s32 isInitialCall) {
|
||||||
if (get_variable(script, *script->ptrReadPos)) {
|
if (evt_get_variable(script, *script->ptrReadPos)) {
|
||||||
show_coin_counter();
|
show_coin_counter();
|
||||||
} else {
|
} else {
|
||||||
hide_coin_counter();
|
hide_coin_counter();
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
#include "common.h"
|
#include "common.h"
|
||||||
|
|
||||||
s32 func_80240000_EA6FD0(void) {
|
s32 func_80240000_EA6FD0(void) {
|
||||||
s32 temp = get_variable(NULL, EVT_STORY_PROGRESS);
|
s32 temp = evt_get_variable(NULL, EVT_STORY_PROGRESS);
|
||||||
|
|
||||||
if (temp <= 0x26) {
|
if (temp <= 0x26) {
|
||||||
return 0x19010F;
|
return 0x19010F;
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
extern s16 D_80169B16;
|
extern s16 D_80169B16;
|
||||||
|
|
||||||
ApiStatus func_80240040_EF2650(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80240040_EF2650(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, D_80169B16);
|
evt_set_variable(script, *script->ptrReadPos, D_80169B16);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -861,7 +861,7 @@ INCLUDE_ASM(s32, "a5dd0_len_114e0", SetEntityCullMode);
|
|||||||
ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) {
|
ApiStatus UseDynamicShadow(Evt* script, s32 isInitialCall) {
|
||||||
Entity* entity = get_entity_by_index(gLastCreatedEntityIndex);
|
Entity* entity = get_entity_by_index(gLastCreatedEntityIndex);
|
||||||
|
|
||||||
if (get_variable(script, *script->ptrReadPos)) {
|
if (evt_get_variable(script, *script->ptrReadPos)) {
|
||||||
Shadow* shadow;
|
Shadow* shadow;
|
||||||
|
|
||||||
entity->flags |= 4;
|
entity->flags |= 4;
|
||||||
@ -878,7 +878,7 @@ ApiStatus AssignScript(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
if (isInitialCall == TRUE) {
|
if (isInitialCall == TRUE) {
|
||||||
Bytecode* toBind = (Bytecode*)get_variable(script, *args++);
|
Bytecode* toBind = (Bytecode*)evt_get_variable(script, *args++);
|
||||||
|
|
||||||
get_entity_by_index(gLastCreatedEntityIndex)->boundScriptBytecode = toBind;
|
get_entity_by_index(gLastCreatedEntityIndex)->boundScriptBytecode = toBind;
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -896,7 +896,7 @@ ApiStatus AssignFlag(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
if (isInitialCall == TRUE) {
|
if (isInitialCall == TRUE) {
|
||||||
Trigger* trigger = (Trigger*)get_entity_by_index(gLastCreatedEntityIndex)->dataBuf;
|
Trigger* trigger = (Trigger*)get_entity_by_index(gLastCreatedEntityIndex)->dataBuf;
|
||||||
trigger->flags.bytes.genericFlagIndex = get_variable_index(script, *args);
|
trigger->flags.bytes.genericFlagIndex = evt_get_variable_index(script, *args);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -18,7 +18,7 @@ ApiStatus func_802A9000_428A70(Evt* script, s32 isInitialCall) {
|
|||||||
battleStatus->unk_82 = 0;
|
battleStatus->unk_82 = 0;
|
||||||
battleStatus->unk_86 = 127;
|
battleStatus->unk_86 = 127;
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_5A = get_variable(script, *args++);
|
actionCommandStatus->unk_5A = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->actionCommandID = ACTION_COMMAND_AIR_LIFT;
|
actionCommandStatus->actionCommandID = ACTION_COMMAND_AIR_LIFT;
|
||||||
actionCommandStatus->unk_61 = 1;
|
actionCommandStatus->unk_61 = 1;
|
||||||
actionCommandStatus->state = 0;
|
actionCommandStatus->state = 0;
|
||||||
|
@ -24,7 +24,7 @@ ApiStatus func_802A9000_422AD0(Evt* script, s32 isInitialCall) {
|
|||||||
battleStatus->unk_434 = &D_80294200;
|
battleStatus->unk_434 = &D_80294200;
|
||||||
battleStatus->unk_86 = 127;
|
battleStatus->unk_86 = 127;
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_5A = get_variable(script, *args++);
|
actionCommandStatus->unk_5A = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->actionCommandID = ACTION_COMMAND_FLEE;
|
actionCommandStatus->actionCommandID = ACTION_COMMAND_FLEE;
|
||||||
actionCommandStatus->state = 0;
|
actionCommandStatus->state = 0;
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
@ -82,9 +82,9 @@ ApiStatus func_802A92A0_422D70(Evt* script) {
|
|||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
battleStatus->actionSuccess = 0;
|
battleStatus->actionSuccess = 0;
|
||||||
|
@ -94,9 +94,9 @@ ApiStatus func_802A9258_422258(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_62 = 1;
|
actionCommandStatus->unk_62 = 1;
|
||||||
|
@ -58,8 +58,8 @@ ApiStatus func_802A9120_421B10(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
} else {
|
} else {
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
battleStatus->actionSuccess = 0;
|
battleStatus->actionSuccess = 0;
|
||||||
|
@ -90,11 +90,11 @@ ApiStatus func_802A9210_42D120(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_64 = get_variable(script, *args++);
|
actionCommandStatus->unk_64 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->unk_44 = 0;
|
||||||
actionCommandStatus->unk_48 = 0;
|
actionCommandStatus->unk_48 = 0;
|
||||||
|
@ -55,9 +55,9 @@ ApiStatus func_802A911C_429E3C(Evt* script) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->unk_44 = 0;
|
||||||
|
@ -52,9 +52,9 @@ ApiStatus func_802A9110_4256A0(Evt* script) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->unk_44 = 0;
|
||||||
|
@ -61,9 +61,9 @@ ApiStatus func_802A9138_42C828(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->unk_44 = 0;
|
||||||
|
@ -16,9 +16,9 @@ ApiStatus func_802A9398_42A888(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->unk_44 = 0;
|
||||||
|
@ -19,7 +19,7 @@ ApiStatus func_802A9000_423C70(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
temp_v0 = get_variable(script, *args);
|
temp_v0 = evt_get_variable(script, *args);
|
||||||
actionCommandStatus->unk_64 = temp_v0;
|
actionCommandStatus->unk_64 = temp_v0;
|
||||||
actionCommandStatus->actionCommandID = ACTION_COMMAND_WHIRLWIND;
|
actionCommandStatus->actionCommandID = ACTION_COMMAND_WHIRLWIND;
|
||||||
actionCommandStatus->state = 0;
|
actionCommandStatus->state = 0;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
#define NAMESPACE b_area_arn
|
#define NAMESPACE b_area_arn
|
||||||
|
|
||||||
ApiStatus func_80218618_4FF068(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80218618_4FF068(Evt* script, s32 isInitialCall) {
|
||||||
s32 temp_s0 = get_variable(script, *script->ptrReadPos);
|
s32 temp_s0 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
|
|
||||||
if (temp_s0 == 0) {
|
if (temp_s0 == 0) {
|
||||||
|
@ -6,15 +6,15 @@
|
|||||||
|
|
||||||
ApiStatus func_802180CC_5B157C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802180CC_5B157C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 prevX = get_variable(script, *args++);
|
s32 prevX = evt_get_variable(script, *args++);
|
||||||
s32 prevZ = get_variable(script, *args++);
|
s32 prevZ = evt_get_variable(script, *args++);
|
||||||
s32 length = get_variable(script, *args++);
|
s32 length = evt_get_variable(script, *args++);
|
||||||
s32 angle = get_variable(script, *args++);
|
s32 angle = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
f32 outX = prevX + (length * cos_deg(angle));
|
f32 outX = prevX + (length * cos_deg(angle));
|
||||||
f32 outZ = prevZ - (length * sin_deg(angle));
|
f32 outZ = prevZ - (length * sin_deg(angle));
|
||||||
|
|
||||||
set_float_variable(script, *args++, outX);
|
evt_set_float_variable(script, *args++, outX);
|
||||||
set_float_variable(script, *args++, outZ);
|
evt_set_float_variable(script, *args++, outZ);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
#define NAMESPACE b_area_iwa
|
#define NAMESPACE b_area_iwa
|
||||||
|
|
||||||
ApiStatus N(SetSpinSmashable)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(SetSpinSmashable)(Evt* script, s32 isInitialCall) {
|
||||||
s32 canSpinSmash = get_variable(script, *script->ptrReadPos);
|
s32 canSpinSmash = evt_get_variable(script, *script->ptrReadPos);
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
|
|
||||||
if (canSpinSmash == FALSE) {
|
if (canSpinSmash == FALSE) {
|
||||||
|
@ -57,20 +57,20 @@ u32 N(angle_calculate)(f32 x, f32 y) {
|
|||||||
|
|
||||||
ApiStatus N(AngleCalculate)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(AngleCalculate)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
s32 var5 = get_variable(script, *args);
|
s32 var5 = evt_get_variable(script, *args);
|
||||||
|
|
||||||
var3 -= var1;
|
var3 -= var1;
|
||||||
var4 -= var2;
|
var4 -= var2;
|
||||||
|
|
||||||
if (var3 == 0 && var4 == 0) {
|
if (var3 == 0 && var4 == 0) {
|
||||||
set_variable(script, *args, var5);
|
evt_set_variable(script, *args, var5);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
} else {
|
} else {
|
||||||
set_variable(script, *args, N(angle_calculate)(var3, var4) - 90);
|
evt_set_variable(script, *args, N(angle_calculate)(var3, var4) - 90);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -25,9 +25,9 @@
|
|||||||
|
|
||||||
ApiStatus func_80218A60_43A4F0(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80218A60_43A4F0(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
fx_land(2, var1, var2, get_variable(script, *args++), 0);
|
fx_land(2, var1, var2, evt_get_variable(script, *args++), 0);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -10,14 +10,14 @@ extern s32 D_80104A28;
|
|||||||
|
|
||||||
ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802189DC_447E1C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
f32 posX = get_float_variable(script, *args++);
|
f32 posX = evt_get_float_variable(script, *args++);
|
||||||
f32 posY = get_float_variable(script, *args++);
|
f32 posY = evt_get_float_variable(script, *args++);
|
||||||
HudElement* icon = create_hud_element(&D_80104A28);
|
HudElement* icon = create_hud_element(&D_80104A28);
|
||||||
|
|
||||||
set_hud_element_render_pos(icon, posX, posY);
|
set_hud_element_render_pos(icon, posX, posY);
|
||||||
set_hud_element_scale(icon, 1.5f);
|
set_hud_element_scale(icon, 1.5f);
|
||||||
clear_hud_element_flags(icon, 0x200002);
|
clear_hud_element_flags(icon, 0x200002);
|
||||||
set_variable(script, *args++, icon);
|
evt_set_variable(script, *args++, icon);
|
||||||
load_tattle_flags(0x8B);
|
load_tattle_flags(0x8B);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -18,9 +18,9 @@ ApiStatus func_80218CF4_5132C4(Evt* script, s32 isInitialCall) {
|
|||||||
status->jumpLossTurns == -1 ||
|
status->jumpLossTurns == -1 ||
|
||||||
status->itemLossTurns == -1
|
status->itemLossTurns == -1
|
||||||
) {
|
) {
|
||||||
set_variable(script, *args++, 0);
|
evt_set_variable(script, *args++, 0);
|
||||||
} else {
|
} else {
|
||||||
set_variable(script, *args++, -1);
|
evt_set_variable(script, *args++, -1);
|
||||||
}
|
}
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -501,7 +501,7 @@ void load_demo_battle(u32 index) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(NULL, EVT_SAVE_FLAG(1817), 1);
|
evt_set_variable(NULL, EVT_SAVE_FLAG(1817), 1);
|
||||||
gCurrentEncounter.unk_07 = 0;
|
gCurrentEncounter.unk_07 = 0;
|
||||||
gCurrentEncounter.unk_10 = 0;
|
gCurrentEncounter.unk_10 = 0;
|
||||||
set_battle_stage(-1);
|
set_battle_stage(-1);
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
|
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_71CF1C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_17(0, a, b, c);
|
playFX_17(0, a, b, c);
|
||||||
playFX_19(0, a, b + 20, c);
|
playFX_19(0, a, b + 20, c);
|
||||||
|
@ -14,10 +14,10 @@ ApiStatus N(func_802A123C_7307DC)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A127C_73081C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A127C_73081C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
|
|
||||||
@ -26,10 +26,10 @@ ApiStatus N(func_802A127C_73081C)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A133C_7308DC)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A133C_7308DC)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, a, b, c, d);
|
playFX_40(1, a, b, c, d);
|
||||||
|
|
||||||
@ -54,7 +54,7 @@ ApiStatus N(func_802A1450_7309F0)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(AddFP)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(AddFP)(Evt* script, s32 isInitialCall) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
s32 amt = get_variable(script, *script->ptrReadPos);
|
s32 amt = evt_get_variable(script, *script->ptrReadPos);
|
||||||
|
|
||||||
// @bug Should be playerData->curFP
|
// @bug Should be playerData->curFP
|
||||||
s32 newFP = playerData->curHP + amt;
|
s32 newFP = playerData->curHP + amt;
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_716E9C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_716E9C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_3F(0, a, b, c, 0);
|
playFX_3F(0, a, b, c, 0);
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_73330C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_73330C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
ItemEntity* item = get_item_entity(script->varTable[14]);
|
ItemEntity* item = get_item_entity(script->varTable[14]);
|
||||||
|
|
||||||
item->position.x = a;
|
item->position.x = a;
|
||||||
@ -26,7 +26,7 @@ ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
partner->koDuration -= get_variable(script, *args++);
|
partner->koDuration -= evt_get_variable(script, *args++);
|
||||||
if (partner->koDuration < 0) {
|
if (partner->koDuration < 0) {
|
||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
@ -43,10 +43,10 @@ ApiStatus N(func_802A12EC_7333BC)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A1378_733448)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1378_733448)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
|
|
||||||
@ -55,10 +55,10 @@ ApiStatus N(func_802A1378_733448)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A1438_733508)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1438_733508)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, a, b, c, d);
|
playFX_40(1, a, b, c, d);
|
||||||
|
|
||||||
@ -71,7 +71,7 @@ ApiStatus N(func_802A1438_733508)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A15A0_733670)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A15A0_733670)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 itemIdx = get_variable(script, *args++);
|
s32 itemIdx = evt_get_variable(script, *args++);
|
||||||
StaticItem* item = &gItemTable[itemIdx];
|
StaticItem* item = &gItemTable[itemIdx];
|
||||||
s32 temp;
|
s32 temp;
|
||||||
|
|
||||||
|
@ -33,9 +33,9 @@ typedef struct N(temp) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A12E0_72AA30)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A12E0_72AA30)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
f32 a = get_variable(script, *args++);
|
f32 a = evt_get_variable(script, *args++);
|
||||||
f32 b = get_variable(script, *args++);
|
f32 b = evt_get_variable(script, *args++);
|
||||||
f32 c = get_variable(script, *args++);
|
f32 c = evt_get_variable(script, *args++);
|
||||||
struct N(temp)* effect;
|
struct N(temp)* effect;
|
||||||
|
|
||||||
a += rand_int(20) - 10;
|
a += rand_int(20) - 10;
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_72E76C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_72E76C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
ItemEntity* item = get_item_entity(script->varTable[14]);
|
ItemEntity* item = get_item_entity(script->varTable[14]);
|
||||||
|
|
||||||
item->position.x = a;
|
item->position.x = a;
|
||||||
@ -26,7 +26,7 @@ ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
partner->koDuration -= get_variable(script, *args++);
|
partner->koDuration -= evt_get_variable(script, *args++);
|
||||||
if (partner->koDuration < 0) {
|
if (partner->koDuration < 0) {
|
||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
@ -43,10 +43,10 @@ ApiStatus N(func_802A12EC_72E81C)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A1378_72E8A8)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1378_72E8A8)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
|
|
||||||
@ -69,7 +69,7 @@ ApiStatus N(func_802A1438_72E968)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A1484_72E9B4)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1484_72E9B4)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 itemIdx = get_variable(script, *args++);
|
s32 itemIdx = evt_get_variable(script, *args++);
|
||||||
StaticItem* itemTable = gItemTable;
|
StaticItem* itemTable = gItemTable;
|
||||||
StaticItem* item = &itemTable[itemIdx];
|
StaticItem* item = &itemTable[itemIdx];
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_715A8C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_715A8C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
ItemEntity* item = get_item_entity(script->varTable[14]);
|
ItemEntity* item = get_item_entity(script->varTable[14]);
|
||||||
|
|
||||||
item->position.x = a;
|
item->position.x = a;
|
||||||
@ -26,7 +26,7 @@ ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
partner->koDuration -= get_variable(script, *args++);
|
partner->koDuration -= evt_get_variable(script, *args++);
|
||||||
if (partner->koDuration < 0) {
|
if (partner->koDuration < 0) {
|
||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
@ -43,10 +43,10 @@ ApiStatus N(func_802A12EC_715B3C)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A1378_715BC8)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1378_715BC8)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
|
|
||||||
@ -55,10 +55,10 @@ ApiStatus N(func_802A1378_715BC8)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A1438_715C88)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1438_715C88)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, a, b, c, d);
|
playFX_40(1, a, b, c, d);
|
||||||
|
|
||||||
@ -72,7 +72,7 @@ ApiStatus N(func_802A1438_715C88)(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus N(func_802A15A0_715DF0)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A15A0_715DF0)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
StaticItem* itemTable = gItemTable;
|
StaticItem* itemTable = gItemTable;
|
||||||
StaticItem* item = &itemTable[get_variable(script, *args++)];
|
StaticItem* item = &itemTable[evt_get_variable(script, *args++)];
|
||||||
|
|
||||||
script->varTable[11] = item->potencyA;
|
script->varTable[11] = item->potencyA;
|
||||||
script->varTable[12] = item->potencyB;
|
script->varTable[12] = item->potencyB;
|
||||||
|
@ -214,9 +214,9 @@ INCLUDE_ASM(ApiStatus, "battle/item/mystery", battle_item_mystery_func_802A13E4_
|
|||||||
|
|
||||||
ApiStatus N(func_802A188C_72CE3C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A188C_72CE3C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_18(2, a, b, c, 0, -1.0f, 0, 5);
|
playFX_18(2, a, b, c, 0, -1.0f, 0, 5);
|
||||||
|
|
||||||
|
@ -51,9 +51,9 @@ INCLUDE_ASM(ApiStatus, "battle/item/shooting_star", battle_item_shooting_star_fu
|
|||||||
|
|
||||||
ApiStatus N(func_802A1388_71DAF8)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1388_71DAF8)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_18(2, a, b, c, 0, -1.0f, 0, 5);
|
playFX_18(2, a, b, c, 0, -1.0f, 0, 5);
|
||||||
|
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_71C06C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_71C06C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_11(2, a, b, c, 30.0f);
|
playFX_11(2, a, b, c, 30.0f);
|
||||||
playFX_11(2, a, b, c, 30.0f);
|
playFX_11(2, a, b, c, 30.0f);
|
||||||
|
@ -207,10 +207,10 @@ INCLUDE_ASM(ApiStatus, "battle/item/strange_cake", battle_item_strange_cake_func
|
|||||||
|
|
||||||
ApiStatus N(func_802A1818_731B18)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1818_731B18)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -218,10 +218,10 @@ ApiStatus N(func_802A1818_731B18)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A18D8_731BD8)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A18D8_731BD8)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, a, b, c, d);
|
playFX_40(1, a, b, c, d);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_724F1C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_724F1C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
ItemEntity* item = get_item_entity(script->varTable[14]);
|
ItemEntity* item = get_item_entity(script->varTable[14]);
|
||||||
|
|
||||||
item->position.x = a;
|
item->position.x = a;
|
||||||
@ -26,7 +26,7 @@ ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) {
|
|||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
partner->koDuration -= get_variable(script, *args++);
|
partner->koDuration -= evt_get_variable(script, *args++);
|
||||||
if (partner->koDuration < 0) {
|
if (partner->koDuration < 0) {
|
||||||
partner->koDuration = 0;
|
partner->koDuration = 0;
|
||||||
}
|
}
|
||||||
@ -42,7 +42,7 @@ ApiStatus N(func_802A12EC_724FCC)(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) {
|
||||||
s32 actorId = get_variable(script, *script->ptrReadPos);
|
s32 actorId = evt_get_variable(script, *script->ptrReadPos);
|
||||||
Actor* actor = get_actor(actorId);
|
Actor* actor = get_actor(actorId);
|
||||||
s32 id = actor->actorID & 0x700;
|
s32 id = actor->actorID & 0x700;
|
||||||
|
|
||||||
@ -70,10 +70,10 @@ ApiStatus N(func_802A1378_725058)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(func_802A1418_7250F8)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A1418_7250F8)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, a, b, c, d);
|
playFX_40(1, a, b, c, d);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
#include "ItemRefund.inc.c"
|
#include "ItemRefund.inc.c"
|
||||||
|
|
||||||
ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_72223C)(Evt* script, s32 isInitialCall) {
|
||||||
s32 actorId = get_variable(script, *script->ptrReadPos);
|
s32 actorId = evt_get_variable(script, *script->ptrReadPos);
|
||||||
Actor* actor = get_actor(actorId);
|
Actor* actor = get_actor(actorId);
|
||||||
s32 id = actor->actorID & 0x700;
|
s32 id = actor->actorID & 0x700;
|
||||||
|
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_7239BC)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_7239BC)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -5,10 +5,10 @@
|
|||||||
|
|
||||||
ApiStatus N(func_802A123C_72447C)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(func_802A123C_72447C)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
s32 d = get_variable(script, *args++);
|
s32 d = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, a, b, c, d);
|
playFX_40(0, a, b, c, d);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
|
@ -7,9 +7,9 @@
|
|||||||
|
|
||||||
ApiStatus func_802A10E4_781A04(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A10E4_781A04(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (script->varTable[10] == 0) {
|
if (script->varTable[10] == 0) {
|
||||||
playFX_32(TRUE, var0, var1, var2, 0.0f);
|
playFX_32(TRUE, var0, var1, var2, 0.0f);
|
||||||
|
@ -9,9 +9,9 @@
|
|||||||
|
|
||||||
ApiStatus func_802A10A4_74AE34(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A10A4_74AE34(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (script->varTable[10] == 0) {
|
if (script->varTable[10] == 0) {
|
||||||
playFX_32(TRUE, var0 + 30, var1 + 25, var2, 45.0f);
|
playFX_32(TRUE, var0 + 30, var1 + 25, var2, 45.0f);
|
||||||
|
@ -12,9 +12,9 @@
|
|||||||
ApiStatus func_802A10C8_74F1F8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A10C8_74F1F8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_56(0, var1, var2, var3, 1.0f, 60);
|
playFX_56(0, var1, var2, var3, 1.0f, 60);
|
||||||
|
|
||||||
@ -32,10 +32,10 @@ ApiStatus func_802A10C8_74F1F8(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802A11CC_74F2FC(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A11CC_74F2FC(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
f32 var3 = get_float_variable(script, *args++);
|
f32 var3 = evt_get_float_variable(script, *args++);
|
||||||
|
|
||||||
playFX_6B(6, var0 + 10, var1 + 18, var2, var3, 45);
|
playFX_6B(6, var0 + 10, var1 + 18, var2, var3, 45);
|
||||||
|
|
||||||
|
@ -15,9 +15,9 @@ ApiStatus func_802A10C8_759678(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
BattleStatus* battleStatus2 = battleStatus; // TODO: macro?
|
BattleStatus* battleStatus2 = battleStatus; // TODO: macro?
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32* var4;
|
s32* var4;
|
||||||
|
|
||||||
playFX_56(1, var1, var2, var3, 1.0f, 60);
|
playFX_56(1, var1, var2, var3, 1.0f, 60);
|
||||||
|
@ -15,9 +15,9 @@ ApiStatus func_802A10C8_75E698(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
BattleStatus* battleStatus2 = battleStatus; // TODO: macro?
|
BattleStatus* battleStatus2 = battleStatus; // TODO: macro?
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32* var4;
|
s32* var4;
|
||||||
|
|
||||||
playFX_56(2, var1, var2, var3, 1.0f, 60);
|
playFX_56(2, var1, var2, var3, 1.0f, 60);
|
||||||
|
@ -10,9 +10,9 @@
|
|||||||
ApiStatus func_802A1108_74D678(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A1108_74D678(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_56(0, var1, var2, var3, 1.0f, 60);
|
playFX_56(0, var1, var2, var3, 1.0f, 60);
|
||||||
|
|
||||||
@ -30,10 +30,10 @@ ApiStatus func_802A1108_74D678(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802A120C_74D77C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A120C_74D77C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
f32 var3 = get_float_variable(script, *args++);
|
f32 var3 = evt_get_float_variable(script, *args++);
|
||||||
|
|
||||||
playFX_6B(6, var0 + 10, var1 + 18, var2, var3, 45);
|
playFX_6B(6, var0 + 10, var1 + 18, var2, var3, 45);
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@ ApiStatus func_802A1108_75CA88(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
BattleStatus* battleStatus2 = battleStatus;
|
BattleStatus* battleStatus2 = battleStatus;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32* var4;
|
s32* var4;
|
||||||
|
|
||||||
playFX_56(1, var1, var2, var3, 1.0f, 60);
|
playFX_56(1, var1, var2, var3, 1.0f, 60);
|
||||||
|
@ -13,9 +13,9 @@ ApiStatus func_802A1108_761A28(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
BattleStatus* battleStatus2 = battleStatus; // TODO: macro?
|
BattleStatus* battleStatus2 = battleStatus; // TODO: macro?
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32* var4;
|
s32* var4;
|
||||||
|
|
||||||
playFX_56(2, var1, var2, var3, 1.0f, 60);
|
playFX_56(2, var1, var2, var3, 1.0f, 60);
|
||||||
|
@ -5,9 +5,9 @@
|
|||||||
ApiStatus func_80238000_6FAD10(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238000_6FAD10(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 x = get_variable(script, *args++);
|
s32 x = evt_get_variable(script, *args++);
|
||||||
s32 y = get_variable(script, *args++);
|
s32 y = evt_get_variable(script, *args++);
|
||||||
s32 z = get_variable(script, *args++);
|
s32 z = evt_get_variable(script, *args++);
|
||||||
s16 selectedMoveID;
|
s16 selectedMoveID;
|
||||||
s32 soundID;
|
s32 soundID;
|
||||||
|
|
||||||
@ -86,7 +86,7 @@ ApiStatus func_80238358_6FB068(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Actor* partnerActor = battleStatus->partnerActor;
|
Actor* partnerActor = battleStatus->partnerActor;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = 0;
|
s32 var1 = 0;
|
||||||
|
|
||||||
switch (partnerActor->staticActorData->level) {
|
switch (partnerActor->staticActorData->level) {
|
||||||
@ -147,7 +147,7 @@ ApiStatus func_8023849C_6FB1AC(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Actor* partnerActor = battleStatus->partnerActor;
|
Actor* partnerActor = battleStatus->partnerActor;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = 0;
|
s32 var1 = 0;
|
||||||
|
|
||||||
switch (partnerActor->staticActorData->level) {
|
switch (partnerActor->staticActorData->level) {
|
||||||
@ -194,7 +194,7 @@ ApiStatus func_80238590_6FB2A0(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Actor* partnerActor = battleStatus->partnerActor;
|
Actor* partnerActor = battleStatus->partnerActor;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = 0;
|
s32 var1 = 0;
|
||||||
|
|
||||||
switch (partnerActor->staticActorData->level) {
|
switch (partnerActor->staticActorData->level) {
|
||||||
|
@ -44,8 +44,8 @@ ApiStatus func_802380E4_710FD4(Evt* script, s32 isInitialCall) {
|
|||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* playerActor = battleStatus->playerActor;
|
Actor* playerActor = battleStatus->playerActor;
|
||||||
f32 var0 = get_variable(script, *args++);
|
f32 var0 = evt_get_variable(script, *args++);
|
||||||
f32 var1 = get_variable(script, *args++);
|
f32 var1 = evt_get_variable(script, *args++);
|
||||||
f32 scalingFactor = playerActor->scalingFactor;
|
f32 scalingFactor = playerActor->scalingFactor;
|
||||||
|
|
||||||
var0 *= scalingFactor;
|
var0 *= scalingFactor;
|
||||||
|
@ -217,10 +217,10 @@ ApiStatus N(IsGlowing)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802390C8_6F21A8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802390C8_6F21A8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
f32 var4 = get_float_variable(script, *args++);
|
f32 var4 = evt_get_float_variable(script, *args++);
|
||||||
|
|
||||||
playFX_6B(6, var1, var2, var3, var4, 45);
|
playFX_6B(6, var1, var2, var3, var4, 45);
|
||||||
|
|
||||||
|
@ -122,9 +122,9 @@ ApiStatus func_80238388_708028(Evt* script, s32 isInitialCall) {
|
|||||||
ApiStatus func_80238480_708120(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238480_708120(Evt* script, s32 isInitialCall) {
|
||||||
BattleStatus* battleStatus = &gBattleStatus;
|
BattleStatus* battleStatus = &gBattleStatus;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
f32 var1 = get_float_variable(script, *args++);
|
f32 var1 = evt_get_float_variable(script, *args++);
|
||||||
f32 var2 = get_float_variable(script, *args++);
|
f32 var2 = evt_get_float_variable(script, *args++);
|
||||||
f32 var3 = get_float_variable(script, *args++);
|
f32 var3 = evt_get_float_variable(script, *args++);
|
||||||
s32 effect = battleStatus->unk_A0;
|
s32 effect = battleStatus->unk_A0;
|
||||||
|
|
||||||
if (effect != NULL) {
|
if (effect != NULL) {
|
||||||
|
@ -47,7 +47,7 @@ ApiStatus func_802383F8_703EE8(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus func_80238408_703EF8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238408_703EF8(Evt* script, s32 isInitialCall) {
|
||||||
D_8023C1C8 = get_variable(script, *script->ptrReadPos);
|
D_8023C1C8 = evt_get_variable(script, *script->ptrReadPos);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -57,9 +57,9 @@ ApiStatus func_80238408_703EF8(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802384B0_703FA0(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802384B0_703FA0(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
D_80239A0C_7054FC = playFX_33(8, var1, var2, var3, 1.3f, 55);
|
D_80239A0C_7054FC = playFX_33(8, var1, var2, var3, 1.3f, 55);
|
||||||
|
|
||||||
@ -81,9 +81,9 @@ ApiStatus func_80238570_704060(Evt* script, s32 isInitialCall) {
|
|||||||
// janky solution, but this does match.
|
// janky solution, but this does match.
|
||||||
ApiStatus func_8023859C_70408C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_8023859C_70408C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
EffectInstanceDataThing* dataThing;
|
EffectInstanceDataThing* dataThing;
|
||||||
|
|
||||||
D_8023C1B4 = playFX_58(0, var1, var2, var3, 1.0f, 10);
|
D_8023C1B4 = playFX_58(0, var1, var2, var3, 1.0f, 10);
|
||||||
@ -120,9 +120,9 @@ INCLUDE_ASM(s32, "battle/partner/watt", func_80238810_704300);
|
|||||||
// janky solution, but this does match.
|
// janky solution, but this does match.
|
||||||
ApiStatus func_80238B3C_70462C(Evt* script, s32 isInitialCall) {
|
ApiStatus func_80238B3C_70462C(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
EffectInstanceDataThing* temp_a0;
|
EffectInstanceDataThing* temp_a0;
|
||||||
|
|
||||||
D_8023C1B4 = playFX_58(0, var1, var2, var3, 1.0f, 60);
|
D_8023C1B4 = playFX_58(0, var1, var2, var3, 1.0f, 60);
|
||||||
|
@ -31,10 +31,10 @@ ApiStatus func_802A17D4_78BDD4(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802A18E8_78BEE8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A18E8_78BEE8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, var1, var2, var3, var4);
|
playFX_40(0, var1, var2, var3, var4);
|
||||||
|
|
||||||
@ -43,10 +43,10 @@ ApiStatus func_802A18E8_78BEE8(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802A19A8_78BFA8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A19A8_78BFA8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(1, var1, var2, var3, var4);
|
playFX_40(1, var1, var2, var3, var4);
|
||||||
|
|
||||||
|
@ -8,10 +8,10 @@
|
|||||||
|
|
||||||
ApiStatus func_802A156C_7922FC(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A156C_7922FC(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_40(0, var1, var2, var3, var4);
|
playFX_40(0, var1, var2, var3, var4);
|
||||||
|
|
||||||
|
@ -23,9 +23,9 @@ ApiStatus func_802A1518_78ECE8(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus func_802A1628_78EDF8(Evt* script, s32 isInitialCall) {
|
ApiStatus func_802A1628_78EDF8(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_18(2, var1, var2, var3, 0, -1.0f, 0, 5);
|
playFX_18(2, var1, var2, var3, 0, -1.0f, 0, 5);
|
||||||
|
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
ApiStatus N(AddFP)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(AddFP)(Evt* script, s32 isInitialCall) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
s32 amt = get_variable(script, *script->ptrReadPos);
|
s32 amt = evt_get_variable(script, *script->ptrReadPos);
|
||||||
s32 newFP = playerData->curFP + amt;
|
s32 newFP = playerData->curFP + amt;
|
||||||
|
|
||||||
if (newFP > playerData->curMaxFP) {
|
if (newFP > playerData->curMaxFP) {
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
ApiStatus N(AddHP)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(AddHP)(Evt* script, s32 isInitialCall) {
|
||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
|
|
||||||
s32 amt = get_variable(script, *script->ptrReadPos);
|
s32 amt = evt_get_variable(script, *script->ptrReadPos);
|
||||||
s32 newHP = playerData->curHP + amt;
|
s32 newHP = playerData->curHP + amt;
|
||||||
|
|
||||||
if (newHP > playerData->curMaxHP) {
|
if (newHP > playerData->curMaxHP) {
|
||||||
|
@ -42,20 +42,20 @@ u32 N(BattleAreaAngleStuff1)(f32 x, f32 y) {
|
|||||||
|
|
||||||
ApiStatus N(BattleAreaAngleStuff2)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(BattleAreaAngleStuff2)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
s32 var5 = get_variable(script, *args);
|
s32 var5 = evt_get_variable(script, *args);
|
||||||
|
|
||||||
var3 -= var1;
|
var3 -= var1;
|
||||||
var4 -= var2;
|
var4 -= var2;
|
||||||
|
|
||||||
if (var3 == 0 && var4 == 0) {
|
if (var3 == 0 && var4 == 0) {
|
||||||
set_variable(script, *args, var5);
|
evt_set_variable(script, *args, var5);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
} else {
|
} else {
|
||||||
set_variable(script, *args, N(BattleAreaAngleStuff1)(var3, var4) - 90);
|
evt_set_variable(script, *args, N(BattleAreaAngleStuff1)(var3, var4) - 90);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -4,21 +4,21 @@
|
|||||||
ApiStatus N(DeadUnkFloatFunc)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(DeadUnkFloatFunc)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a1 = *args++;
|
s32 a1 = *args++;
|
||||||
s32 var0 = get_variable(script, a1);
|
s32 var0 = evt_get_variable(script, a1);
|
||||||
s32 a2 = *args++;
|
s32 a2 = *args++;
|
||||||
f32 var1 = get_float_variable(script, *args++);
|
f32 var1 = evt_get_float_variable(script, *args++);
|
||||||
f32 var2 = get_float_variable(script, *args++);
|
f32 var2 = evt_get_float_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
f32 temp = (get_float_variable(script, *args++) / 180.0f) * PI;
|
f32 temp = (evt_get_float_variable(script, *args++) / 180.0f) * PI;
|
||||||
f32 diff = (var2 - var1) / 2;
|
f32 diff = (var2 - var1) / 2;
|
||||||
|
|
||||||
if (var4 != 0 && var3 < var0) {
|
if (var4 != 0 && var3 < var0) {
|
||||||
var0 = var3;
|
var0 = var3;
|
||||||
set_variable(script, a1, var3);
|
evt_set_variable(script, a1, var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp)));
|
evt_set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp)));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -5,21 +5,21 @@
|
|||||||
ApiStatus N(DeadUnkFloatFuncAbs)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(DeadUnkFloatFuncAbs)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a1 = *args++;
|
s32 a1 = *args++;
|
||||||
s32 var0 = get_variable(script, a1);
|
s32 var0 = evt_get_variable(script, a1);
|
||||||
s32 a2 = *args++;
|
s32 a2 = *args++;
|
||||||
f32 var1 = get_float_variable(script, *args++);
|
f32 var1 = evt_get_float_variable(script, *args++);
|
||||||
f32 var2 = get_float_variable(script, *args++);
|
f32 var2 = evt_get_float_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
f32 temp = (get_float_variable(script, *args++) / 180.0f) * PI;
|
f32 temp = (evt_get_float_variable(script, *args++) / 180.0f) * PI;
|
||||||
f32 diff = fabsf(var2 - var1) / 2;
|
f32 diff = fabsf(var2 - var1) / 2;
|
||||||
|
|
||||||
if (var4 != 0 && var3 < var0) {
|
if (var4 != 0 && var3 < var0) {
|
||||||
var0 = var3;
|
var0 = var3;
|
||||||
set_variable(script, a1, var3);
|
evt_set_variable(script, a1, var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp)));
|
evt_set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp)));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,16 +3,16 @@
|
|||||||
|
|
||||||
ApiStatus N(Dist3D)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(Dist3D)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
s32 var5 = get_variable(script, *args++);
|
s32 var5 = evt_get_variable(script, *args++);
|
||||||
s32 var6 = get_variable(script, *args++);
|
s32 var6 = evt_get_variable(script, *args++);
|
||||||
f32 diff1 = var1 - var4;
|
f32 diff1 = var1 - var4;
|
||||||
f32 diff2 = var2 - var5;
|
f32 diff2 = var2 - var5;
|
||||||
f32 diff3 = var3 - var6;
|
f32 diff3 = var3 - var6;
|
||||||
|
|
||||||
set_variable(script, *args++, sqrtf(SQ(diff1) + SQ(diff2) + SQ(diff3)));
|
evt_set_variable(script, *args++, sqrtf(SQ(diff1) + SQ(diff2) + SQ(diff3)));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
|
||||||
ApiStatus N(FreeIcon)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(FreeIcon)(Evt* script, s32 isInitialCall) {
|
||||||
free_hud_element(get_variable(script, *script->ptrReadPos));
|
free_hud_element(evt_get_variable(script, *script->ptrReadPos));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
ApiStatus N(GetBootsHammerLevel)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(GetBootsHammerLevel)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
set_variable(script, *args++, gPlayerData.bootsLevel);
|
evt_set_variable(script, *args++, gPlayerData.bootsLevel);
|
||||||
set_variable(script, *args++, gPlayerData.hammerLevel);
|
evt_set_variable(script, *args++, gPlayerData.hammerLevel);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,10 +3,10 @@
|
|||||||
|
|
||||||
ApiStatus N(GetItemEntityPosition)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(GetItemEntityPosition)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
ItemEntity* entity = get_item_entity(get_variable(script, *args++));
|
ItemEntity* entity = get_item_entity(evt_get_variable(script, *args++));
|
||||||
|
|
||||||
set_variable(script, *args++, entity->position.x);
|
evt_set_variable(script, *args++, entity->position.x);
|
||||||
set_variable(script, *args++, entity->position.y);
|
evt_set_variable(script, *args++, entity->position.y);
|
||||||
set_variable(script, *args++, entity->position.z);
|
evt_set_variable(script, *args++, entity->position.z);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,8 +3,8 @@
|
|||||||
ApiStatus N(GetJumpHammerCharge)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(GetJumpHammerCharge)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
set_variable(script, *args++, gBattleStatus.jumpCharge);
|
evt_set_variable(script, *args++, gBattleStatus.jumpCharge);
|
||||||
set_variable(script, *args++, gBattleStatus.hammerCharge);
|
evt_set_variable(script, *args++, gBattleStatus.hammerCharge);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ ApiStatus N(GetLastEventType)(Evt* script, s32 isInitialCall) {
|
|||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
|
|
||||||
actor->lastEventType = get_variable(script, *args++);
|
actor->lastEventType = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,6 @@
|
|||||||
#include "map.h"
|
#include "map.h"
|
||||||
|
|
||||||
ApiStatus N(GetSelectedMoveID)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(GetSelectedMoveID)(Evt* script, s32 isInitialCall) {
|
||||||
set_variable(script, *script->ptrReadPos, gBattleStatus.selectedMoveID);
|
evt_set_variable(script, *script->ptrReadPos, gBattleStatus.selectedMoveID);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
ApiStatus N(IsSaveVar123)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(IsSaveVar123)(Evt* script, s32 isInitialCall) {
|
||||||
script->varTable[0] = 0;
|
script->varTable[0] = 0;
|
||||||
if (get_variable(NULL, EVT_SAVE_VAR(123)) >= 8) {
|
if (evt_get_variable(NULL, EVT_SAVE_VAR(123)) >= 8) {
|
||||||
script->varTable[0] = 1;
|
script->varTable[0] = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -11,11 +11,11 @@ ApiStatus N(MashActionCommandInit)(Evt* script, s32 isInitialCall) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func_80268858();
|
func_80268858();
|
||||||
actionCommandStatus->unk_4E = get_variable(script, *args++);
|
actionCommandStatus->unk_4E = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_52 = get_variable(script, *args++);
|
actionCommandStatus->unk_52 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = get_variable(script, *args++);
|
actionCommandStatus->unk_50 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
actionCommandStatus->unk_50 = func_80268224(actionCommandStatus->unk_50);
|
||||||
actionCommandStatus->unk_64 = get_variable(script, *args++);
|
actionCommandStatus->unk_64 = evt_get_variable(script, *args++);
|
||||||
actionCommandStatus->unk_60 = 0;
|
actionCommandStatus->unk_60 = 0;
|
||||||
actionCommandStatus->unk_44 = 0;
|
actionCommandStatus->unk_44 = 0;
|
||||||
actionCommandStatus->unk_48 = 0;
|
actionCommandStatus->unk_48 = 0;
|
||||||
|
@ -2,12 +2,12 @@
|
|||||||
ApiStatus N(MediGuySpriteRotationFunc)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(MediGuySpriteRotationFunc)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
s32 angle = get_variable(script, *args++);
|
s32 angle = evt_get_variable(script, *args++);
|
||||||
s32 outPos = *(args++);
|
s32 outPos = *(args++);
|
||||||
s32 temp_s3 = get_variable(script, *args++);
|
s32 temp_s3 = evt_get_variable(script, *args++);
|
||||||
s32 temp_s0_5 = get_variable(script, *args++);
|
s32 temp_s0_5 = evt_get_variable(script, *args++);
|
||||||
f32 temp_f20 = get_float_variable(script, *args++) * (1.0f - (angle / (f32) temp_s0_5));
|
f32 temp_f20 = evt_get_float_variable(script, *args++) * (1.0f - (angle / (f32) temp_s0_5));
|
||||||
|
|
||||||
set_variable(script, outPos, temp_f20 * cos_rad((angle * 6.283184f) / temp_s3));
|
evt_set_variable(script, outPos, temp_f20 * cos_rad((angle * 6.283184f) / temp_s3));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,6 @@
|
|||||||
ApiStatus N(SetBackgroundAlpha)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(SetBackgroundAlpha)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
set_background_color_blend(0, 0, 0, get_variable(script, *args++));
|
set_background_color_blend(0, 0, 0, evt_get_variable(script, *args++));
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
ApiStatus N(ShrinkActor)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(ShrinkActor)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
f32 var1 = get_float_variable(script, *args++);
|
f32 var1 = evt_get_float_variable(script, *args++);
|
||||||
f32 var2 = get_float_variable(script, *args++);
|
f32 var2 = evt_get_float_variable(script, *args++);
|
||||||
f32 var3 = get_float_variable(script, *args++);
|
f32 var3 = evt_get_float_variable(script, *args++);
|
||||||
f32 var4 = get_float_variable(script, *args++);
|
f32 var4 = evt_get_float_variable(script, *args++);
|
||||||
f32 var5 = get_float_variable(script, *args++);
|
f32 var5 = evt_get_float_variable(script, *args++);
|
||||||
f32 var6 = get_float_variable(script, *args++);
|
f32 var6 = evt_get_float_variable(script, *args++);
|
||||||
s32 var7 = get_variable(script, *args++);
|
s32 var7 = evt_get_variable(script, *args++);
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
EffectInstance* effect = playFX_12(0, var1, (f32) var2 + 5.0, var3, var4, var5, var6, var7);
|
EffectInstance* effect = playFX_12(0, var1, (f32) var2 + 5.0, var3, var4, var5, var6, var7);
|
||||||
|
|
||||||
|
@ -3,9 +3,9 @@
|
|||||||
|
|
||||||
ApiStatus N(UnkStarFunc1)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkStarFunc1)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_11(0, a, b, c, 40.0f);
|
playFX_11(0, a, b, c, 40.0f);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -13,9 +13,9 @@ ApiStatus N(UnkStarFunc1)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(UnkStarFunc2)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkStarFunc2)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_22(5, a, b, c, 50.0f, 50.0f, 40, 30);
|
playFX_22(5, a, b, c, 50.0f, 50.0f, 40, 30);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -23,9 +23,9 @@ ApiStatus N(UnkStarFunc2)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(UnkStarFunc3)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkStarFunc3)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a = get_variable(script, *args++);
|
s32 a = evt_get_variable(script, *args++);
|
||||||
s32 b = get_variable(script, *args++);
|
s32 b = evt_get_variable(script, *args++);
|
||||||
s32 c = get_variable(script, *args++);
|
s32 c = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_11(0, a, b, c, 30.0f);
|
playFX_11(0, a, b, c, 30.0f);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
@ -33,10 +33,10 @@ ApiStatus N(UnkStarFunc3)(Evt* script, s32 isInitialCall) {
|
|||||||
|
|
||||||
ApiStatus N(UnkStarFunc4)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkStarFunc4)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
playFX_72(4, var1, var2, get_variable(script, *args++), 20.0f, 20.0f, 1.0f, 0xA, 0xF);
|
playFX_72(4, var1, var2, evt_get_variable(script, *args++), 20.0f, 20.0f, 1.0f, 0xA, 0xF);
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
ApiStatus N(StartRumbleWithParams)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(StartRumbleWithParams)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
start_rumble(get_variable(script, *args++), get_variable(script, *args++));
|
start_rumble(evt_get_variable(script, *args++), evt_get_variable(script, *args++));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
ApiStatus N(UnkAngleFunc2)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkAngleFunc2)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
f32 var0 = get_variable(script, *args++) / 10.0;
|
f32 var0 = evt_get_variable(script, *args++) / 10.0;
|
||||||
s32 a3 = *args++;
|
s32 a3 = *args++;
|
||||||
s32 a4 = *args++;
|
s32 a4 = *args++;
|
||||||
s32 a5 = *args++;
|
s32 a5 = *args++;
|
||||||
@ -15,9 +15,9 @@ ApiStatus N(UnkAngleFunc2)(Evt* script, s32 isInitialCall) {
|
|||||||
f32 fout3 = cos_rad(temp1) * 150.0f / 20.0f + -50.0f;
|
f32 fout3 = cos_rad(temp1) * 150.0f / 20.0f + -50.0f;
|
||||||
s32 outVal;
|
s32 outVal;
|
||||||
|
|
||||||
set_float_variable(script, a3, fout1);
|
evt_set_float_variable(script, a3, fout1);
|
||||||
set_float_variable(script, a4, fout2);
|
evt_set_float_variable(script, a4, fout2);
|
||||||
set_float_variable(script, a5, fout3);
|
evt_set_float_variable(script, a5, fout3);
|
||||||
|
|
||||||
outVal = 0;
|
outVal = 0;
|
||||||
if (var0 > 90.0f && var0 < 270.0f) {
|
if (var0 > 90.0f && var0 < 270.0f) {
|
||||||
@ -29,7 +29,7 @@ ApiStatus N(UnkAngleFunc2)(Evt* script, s32 isInitialCall) {
|
|||||||
if ((s32)fabsf(270.0f - var0) < 45) {
|
if ((s32)fabsf(270.0f - var0) < 45) {
|
||||||
outVal = 2.0f * (var0 - 225.0f) + 180.0f;
|
outVal = 2.0f * (var0 - 225.0f) + 180.0f;
|
||||||
}
|
}
|
||||||
set_variable(script, a6, outVal);
|
evt_set_variable(script, a6, outVal);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
ApiStatus N(UnkBattleFunc1)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkBattleFunc1)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 var1 = get_variable(script, *args++);
|
s32 var1 = evt_get_variable(script, *args++);
|
||||||
s32 var2 = get_variable(script, *args++);
|
s32 var2 = evt_get_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
Actor* actor = get_actor(script->owner1.actorID);
|
Actor* actor = get_actor(script->owner1.actorID);
|
||||||
|
|
||||||
actor->unk_194 = (s8)(var0 - actor->staticActorData->statusIconOffset.x);
|
actor->unk_194 = (s8)(var0 - actor->staticActorData->statusIconOffset.x);
|
||||||
|
@ -3,22 +3,22 @@
|
|||||||
|
|
||||||
ApiStatus N(UnkBattleFunc2)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkBattleFunc2)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 x = get_variable(script, *args++);
|
s32 x = evt_get_variable(script, *args++);
|
||||||
s32 y = get_variable(script, *args++);
|
s32 y = evt_get_variable(script, *args++);
|
||||||
s32 z = get_variable(script, *args++);
|
s32 z = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
func_802D7460(x, y, z, get_variable(script, *args++));
|
func_802D7460(x, y, z, evt_get_variable(script, *args++));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
|
||||||
ApiStatus N(UnkBattleFunc2_2)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkBattleFunc2_2)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 x = get_variable(script, *args++);
|
s32 x = evt_get_variable(script, *args++);
|
||||||
s32 y = get_variable(script, *args++);
|
s32 y = evt_get_variable(script, *args++);
|
||||||
s32 z = get_variable(script, *args++);
|
s32 z = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
func_802D74C0(x, y, z, get_variable(script, *args++));
|
func_802D74C0(x, y, z, evt_get_variable(script, *args++));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
|
|
||||||
ApiStatus N(UnkBattleFunc5)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkBattleFunc5)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 actorID = get_variable(script, *args++);
|
s32 actorID = evt_get_variable(script, *args++);
|
||||||
s32 partID = get_variable(script, *args++);
|
s32 partID = evt_get_variable(script, *args++);
|
||||||
|
|
||||||
if (actorID == ACTOR_SELF) {
|
if (actorID == ACTOR_SELF) {
|
||||||
actorID = script->owner1.actorID;
|
actorID = script->owner1.actorID;
|
||||||
}
|
}
|
||||||
|
|
||||||
set_variable(script, *args++, lookup_defense(get_actor_part(get_actor(actorID), partID)->defenseTable, 1));
|
evt_set_variable(script, *args++, lookup_defense(get_actor_part(get_actor(actorID), partID)->defenseTable, 1));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -4,21 +4,21 @@
|
|||||||
ApiStatus N(UnkFloatFunc)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkFloatFunc)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 a1 = *args++;
|
s32 a1 = *args++;
|
||||||
s32 var0 = get_variable(script, a1);
|
s32 var0 = evt_get_variable(script, a1);
|
||||||
s32 a2 = *args++;
|
s32 a2 = *args++;
|
||||||
f32 var1 = get_float_variable(script, *args++);
|
f32 var1 = evt_get_float_variable(script, *args++);
|
||||||
f32 var2 = get_float_variable(script, *args++);
|
f32 var2 = evt_get_float_variable(script, *args++);
|
||||||
s32 var3 = get_variable(script, *args++);
|
s32 var3 = evt_get_variable(script, *args++);
|
||||||
s32 var4 = get_variable(script, *args++);
|
s32 var4 = evt_get_variable(script, *args++);
|
||||||
f32 temp = (get_float_variable(script, *args++) / 180.0f) * PI;
|
f32 temp = (evt_get_float_variable(script, *args++) / 180.0f) * PI;
|
||||||
f32 diff = (var2 - var1) / 2;
|
f32 diff = (var2 - var1) / 2;
|
||||||
|
|
||||||
if (var4 != 0 && var3 < var0) {
|
if (var4 != 0 && var3 < var0) {
|
||||||
var0 = var3;
|
var0 = var3;
|
||||||
set_variable(script, a1, var3);
|
evt_set_variable(script, a1, var3);
|
||||||
}
|
}
|
||||||
|
|
||||||
set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp)));
|
evt_set_float_variable(script, a2, (var1 + diff) - (diff * cos_rad(((var0 * PI) / var3) + temp)));
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -3,15 +3,15 @@
|
|||||||
|
|
||||||
ApiStatus N(UnkFloatFunc2)(Evt* script, s32 isInitialCall) {
|
ApiStatus N(UnkFloatFunc2)(Evt* script, s32 isInitialCall) {
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
s32 var0 = get_variable(script, *args++);
|
s32 var0 = evt_get_variable(script, *args++);
|
||||||
s32 a1 = *args++;
|
s32 a1 = *args++;
|
||||||
s32 a2 = *args++;
|
s32 a2 = *args++;
|
||||||
s32 a3 = *args++;
|
s32 a3 = *args++;
|
||||||
f32 temp = sin_rad(var0 / 10 * 6.28318f / 360.0f * 8.0f) * 10.0f;
|
f32 temp = sin_rad(var0 / 10 * 6.28318f / 360.0f * 8.0f) * 10.0f;
|
||||||
|
|
||||||
set_variable(script, a1, 0);
|
evt_set_variable(script, a1, 0);
|
||||||
set_variable(script, a2, temp);
|
evt_set_variable(script, a2, temp);
|
||||||
set_variable(script, a3, 0);
|
evt_set_variable(script, a3, 0);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
@ -4,7 +4,7 @@ ApiStatus N(UnkStarFunc)(Evt* script, s32 isInitialCall) {
|
|||||||
PlayerData* playerData = &gPlayerData;
|
PlayerData* playerData = &gPlayerData;
|
||||||
Bytecode* args = script->ptrReadPos;
|
Bytecode* args = script->ptrReadPos;
|
||||||
|
|
||||||
set_animation(0x100, 0, D_8029C890[playerData->currentPartner][get_variable(script, *args++)]);
|
set_animation(0x100, 0, D_8029C890[playerData->currentPartner][evt_get_variable(script, *args++)]);
|
||||||
|
|
||||||
return ApiStatus_DONE2;
|
return ApiStatus_DONE2;
|
||||||
}
|
}
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user