Skip to content

Commit 99196df

Browse files
committed
Fixes
1 parent d6b56b7 commit 99196df

File tree

9 files changed

+43
-44
lines changed

9 files changed

+43
-44
lines changed

fighters/edge/src/acmd/specials.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ unsafe extern "C" fn edge_special_n1_game(fighter: &mut L2CAgentBase) {
6262
}
6363

6464

65-
unsafe fn edge_special_n2_game(fighter: &mut L2CAgentBase) {
65+
unsafe extern "C" fn edge_special_n2_game(fighter: &mut L2CAgentBase) {
6666
let lua_state = fighter.lua_state_agent;
6767
let boma = fighter.boma();
6868
frame(lua_state, 1.0);

fighters/edge/src/acmd/tilts.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use super::*;
22

3-
#[acmd_script( agent = "edge", script = "game_attacks3hi" , category = ACMD_GAME , low_priority)]
4-
unsafe fn edge_attack_s3_hi_game(fighter: &mut L2CAgentBase) {
3+
4+
unsafe extern "C" fn edge_attack_s3_hi_game(fighter: &mut L2CAgentBase) {
55
let lua_state = fighter.lua_state_agent;
66
let boma = fighter.boma();
77
frame(lua_state, 1.0);
@@ -338,8 +338,8 @@ unsafe extern "C" fn edge_attack_hi3_effect(fighter: &mut L2CAgentBase) {
338338
}
339339
}
340340

341-
#[acmd_script( agent = "edge", script = "sound_attackhi3" , category = ACMD_SOUND , low_priority)]
342-
unsafe fn edge_attack_hi3_sound(fighter: &mut L2CAgentBase) {
341+
342+
unsafe extern "C" fn edge_attack_hi3_sound(fighter: &mut L2CAgentBase) {
343343
let lua_state = fighter.lua_state_agent;
344344
let boma = fighter.boma();
345345
frame(lua_state, 1.0);
@@ -357,8 +357,8 @@ unsafe fn edge_attack_hi3_sound(fighter: &mut L2CAgentBase) {
357357
}
358358
}
359359

360-
#[acmd_script( agent = "edge", script = "expression_attackhi3" , category = ACMD_EXPRESSION , low_priority)]
361-
unsafe fn edge_attack_hi3_expression(fighter: &mut L2CAgentBase) {
360+
361+
unsafe extern "C" fn edge_attack_hi3_expression(fighter: &mut L2CAgentBase) {
362362
let lua_state = fighter.lua_state_agent;
363363
let boma = fighter.boma();
364364
if is_excute(fighter) {

fighters/edge/src/status/edge_fire_fly.rs

+8-8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::*;
22
use globals::*;
33

4-
#[status_script(agent = "edge_fire", status = WEAPON_EDGE_FIRE_STATUS_KIND_FLY_S, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)]
5-
unsafe fn fly_s_main(fighter: &mut L2CWeaponCommon) -> L2CValue {
4+
5+
unsafe extern "C" fn fly_s_main(fighter: &mut L2CWeaponCommon) -> L2CValue {
66
let life = WorkModule::get_param_int(fighter.module_accessor, hash40("param_fire"), hash40("life_s"));
77
WorkModule::set_int(fighter.module_accessor, life, *WEAPON_INSTANCE_WORK_ID_INT_LIFE);
88
MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n1"), 0.0, 1.0, false, 0.0, false, false);
@@ -29,8 +29,8 @@ unsafe extern "C" fn fly_s_main_loop(fighter: &mut L2CWeaponCommon) -> L2CValue
2929
return 0.into()
3030
}
3131

32-
#[status_script(agent = "edge_fire", status = WEAPON_EDGE_FIRE_STATUS_KIND_FLY_M, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)]
33-
unsafe fn fly_m_main(fighter: &mut L2CWeaponCommon) -> L2CValue {
32+
33+
unsafe extern "C" fn fly_m_main(fighter: &mut L2CWeaponCommon) -> L2CValue {
3434
let life = WorkModule::get_param_int(fighter.module_accessor, hash40("param_fire"), hash40("life_m"));
3535
WorkModule::set_int(fighter.module_accessor, life, *WEAPON_INSTANCE_WORK_ID_INT_LIFE);
3636
MotionModule::change_motion(fighter.module_accessor, Hash40::new("special_n2"), 0.0, 1.0, false, 0.0, false, false);
@@ -92,8 +92,8 @@ unsafe extern "C" fn sub_fly(fighter: &mut L2CWeaponCommon, status: L2CValue) ->
9292
}
9393

9494
pub fn install() {
95-
install_status_scripts!(
96-
fly_s_main,
97-
fly_m_main,
98-
);
95+
smashline::Agent::new("edge_fire")
96+
.status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_S, fly_s_main)
97+
.status(Main, *WEAPON_EDGE_FIRE_STATUS_KIND_FLY_M, fly_m_main)
98+
.install();
9999
}

fighters/edge/src/status/special_n.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::*;
22
use globals::*;
33

4-
#[status_script(agent = "edge", status = FIGHTER_STATUS_KIND_SPECIAL_N, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)]
5-
unsafe fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue {
4+
5+
unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue {
66
fighter.sub_change_motion_by_situation(Hash40::new("special_n_start").into(), Hash40::new("special_air_n_start").into(), false.into());
77
fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_n").into());
88
special_hi_set_kinetics(fighter, true);
@@ -103,7 +103,7 @@ unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, par
103103
}
104104

105105
pub fn install() {
106-
install_status_scripts!(
107-
special_n_main,
108-
);
106+
smashline::Agent::new("edge")
107+
.status(Main, *FIGHTER_STATUS_KIND_SPECIAL_N, special_n_main)
108+
.install();
109109
}

fighters/kirby/src/acmd/copyspecials.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ unsafe extern "C" fn diddy_special_air_n_cancel_expression(fighter: &mut L2CAgen
6767
}
6868

6969

70-
unsafe extern "C" edge_special_n_start(fighter: &mut L2CAgentBase) {
70+
unsafe extern "C" fn edge_special_n_start(fighter: &mut L2CAgentBase) {
7171
let lua_state = fighter.lua_state_agent;
7272
let boma = fighter.boma();
7373
frame(lua_state, 20.0);
@@ -103,7 +103,7 @@ unsafe extern "C" edge_special_n_start(fighter: &mut L2CAgentBase) {
103103
}
104104

105105

106-
unsafe extern "C" edge_special_n1_game(fighter: &mut L2CAgentBase) {
106+
unsafe extern "C" fn edge_special_n1_game(fighter: &mut L2CAgentBase) {
107107
let lua_state = fighter.lua_state_agent;
108108
let boma = fighter.boma();
109109
frame(lua_state, 1.0);
@@ -125,7 +125,7 @@ unsafe extern "C" edge_special_n1_game(fighter: &mut L2CAgentBase) {
125125
}
126126

127127

128-
unsafe extern "C" edge_special_n2_game(fighter: &mut L2CAgentBase) {
128+
unsafe extern "C" fn edge_special_n2_game(fighter: &mut L2CAgentBase) {
129129
let lua_state = fighter.lua_state_agent;
130130
let boma = fighter.boma();
131131
frame(lua_state, 1.0);
@@ -147,7 +147,7 @@ unsafe extern "C" edge_special_n2_game(fighter: &mut L2CAgentBase) {
147147
}
148148

149149

150-
unsafe extern "C" ganon_float_start_game(fighter: &mut L2CAgentBase) {
150+
unsafe extern "C" fn ganon_float_start_game(fighter: &mut L2CAgentBase) {
151151
let lua_state = fighter.lua_state_agent;
152152
let boma = fighter.boma();
153153
frame(lua_state, 6.0);

fighters/kirby/src/acmd/other.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) {
187187
}
188188

189189

190-
unsafe extern "C" game_landingheavy(fighter: &mut L2CAgentBase) {
190+
unsafe extern "C" fn game_landingheavy(fighter: &mut L2CAgentBase) {
191191
let lua_state = fighter.lua_state_agent;
192192
let boma = fighter.boma();
193193
if is_excute(fighter) {
@@ -196,7 +196,7 @@ unsafe extern "C" game_landingheavy(fighter: &mut L2CAgentBase) {
196196
}
197197

198198

199-
unsafe extern "C" landingheavy_effect(fighter: &mut L2CAgentBase) {
199+
unsafe extern "C" fn landingheavy_effect(fighter: &mut L2CAgentBase) {
200200
let lua_state = fighter.lua_state_agent;
201201
let boma = fighter.boma();
202202
if is_excute(fighter) {

fighters/kirby/src/status.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -260,7 +260,7 @@ unsafe extern "C" fn special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue {
260260
pub fn install() {
261261
special_hi_h::install();
262262
ganon_special_n_float::install();
263-
littlemac_special_n_cancel::install();
263+
littlemac_special_n::install();
264264
diddy_special_n_cancel::install();
265265
edge_special_n::install();
266266

fighters/kirby/src/status/edge_special_n.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use super::*;
22
use globals::*;
33

4-
#[status_script(agent = "kirby", status = FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)]
5-
unsafe fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue {
4+
5+
unsafe extern "C" fn special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue {
66
fighter.sub_change_motion_by_situation(Hash40::new("edge_special_n_start").into(), Hash40::new("edge_special_air_n_start").into(), false.into());
77
fighter.sub_set_special_start_common_kinetic_setting(hash40("param_special_n").into());
88
special_hi_set_kinetics(fighter, true);
@@ -103,7 +103,7 @@ unsafe extern "C" fn special_hi_set_kinetics(fighter: &mut L2CFighterCommon, par
103103
}
104104

105105
pub fn install() {
106-
install_status_scripts!(
107-
special_n_main,
108-
);
106+
smashline::Agent::new("kirby")
107+
.status(Main, *FIGHTER_KIRBY_STATUS_KIND_EDGE_SPECIAL_N, special_n_main)
108+
.install();
109109
}

fighters/kirby/src/status/littlemac_special_n.rs

+11-12
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ use globals::*;
44
#[skyline::from_offset(0xb96770)]
55
fn copy_ability_reset(fighter: *mut Fighter, some_miifighter_bool: bool);
66

7-
#[status_script(agent = "kirby", status = FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_PRE)]
8-
unsafe fn littlemac_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue {
7+
8+
unsafe extern "C" fn littlemac_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue {
99
fighter.sub_status_pre_SpecialNCommon();
1010
StatusModule::init_settings(fighter.module_accessor,
1111
app::SituationKind(*SITUATION_KIND_NONE),
@@ -34,8 +34,8 @@ unsafe fn littlemac_special_n_pre(fighter: &mut L2CFighterCommon) -> L2CValue {
3434
0.into()
3535
}
3636

37-
#[status_script(agent = "kirby", status = FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_MAIN)]
38-
unsafe fn littlemac_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue {
37+
38+
unsafe extern "C" fn littlemac_special_n_main(fighter: &mut L2CFighterCommon) -> L2CValue {
3939
WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_SUB_KIND_UNIQ, *FIGHTER_INSTANCE_WORK_ID_INT_TRICK_SUB);
4040
let sum_spd_x = KineticModule::get_sum_speed_x(fighter.module_accessor, *KINETIC_ENERGY_RESERVE_ATTRIBUTE_MAIN);
4141
if fighter.is_situation(*SITUATION_KIND_GROUND) {
@@ -131,8 +131,8 @@ unsafe extern "C" fn littlemac_special_n_main_loop(fighter: &mut L2CFighterCommo
131131
return 0.into()
132132
}
133133

134-
#[status_script(agent = "kirby", status = FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, condition = LUA_SCRIPT_STATUS_FUNC_STATUS_END)]
135-
unsafe fn littlemac_special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue {
134+
135+
unsafe extern "C" fn littlemac_special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue {
136136
WorkModule::set_int(fighter.module_accessor, *FIGHTER_LOG_ATTACK_SUB_KIND_NONE, *FIGHTER_INSTANCE_WORK_ID_INT_TRICK_SUB);
137137
EFFECT_OFF_KIND(fighter, Hash40::new("sys_starrod_bullet"), false, false);
138138
let kirb = fighter.battle_object.cast::<Fighter>();
@@ -143,10 +143,9 @@ unsafe fn littlemac_special_n_end(fighter: &mut L2CFighterCommon) -> L2CValue {
143143
}
144144

145145
pub fn install() {
146-
install_status_scripts!(
147-
littlemac_special_n_main,
148-
littlemac_special_n_pre,
149-
littlemac_special_n_main,
150-
littlemac_special_n_end,
151-
);
146+
smashline::Agent::new("kirby")
147+
.status(Pre, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_pre)
148+
.status(Main, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_main)
149+
.status(End, *FIGHTER_KIRBY_STATUS_KIND_LITTLEMAC_SPECIAL_N_START, littlemac_special_n_end)
150+
.install();
152151
}

0 commit comments

Comments
 (0)