Skip to content

Commit

Permalink
Kirby's worse nightmare
Browse files Browse the repository at this point in the history
  • Loading branch information
BEANSS0328 committed Mar 23, 2024
1 parent d5e9d81 commit ffa4185
Show file tree
Hide file tree
Showing 13 changed files with 774 additions and 792 deletions.
280 changes: 139 additions & 141 deletions fighters/metaknight/src/acmd/aerials.rs

Large diffs are not rendered by default.

142 changes: 70 additions & 72 deletions fighters/metaknight/src/acmd/ground.rs

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions fighters/metaknight/src/acmd/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ mod specials;
mod throws;
mod ground;

pub fn install() {
aerials::install();
tilts::install();
other::install();
smashes::install();
specials::install();
throws::install();
ground::install();
pub fn install(agent: &mut Agent) {
aerials::install(agent);
tilts::install(agent);
other::install(agent);
smashes::install(agent);
specials::install(agent);
throws::install(agent);
ground::install(agent);
}
44 changes: 21 additions & 23 deletions fighters/metaknight/src/acmd/other.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

use super::*;

unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn sound_damageflyhi(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 1.0);
Expand All @@ -26,7 +26,7 @@ unsafe extern "C" fn damageflyhi_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn sound_damageflylw(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 1.0);
Expand All @@ -51,7 +51,7 @@ unsafe extern "C" fn damageflylw_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn sound_damageflyn(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 1.0);
Expand All @@ -76,7 +76,7 @@ unsafe extern "C" fn damageflyn_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn sound_damageflyroll(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 1.0);
Expand All @@ -91,7 +91,7 @@ unsafe extern "C" fn damageflyroll_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn sound_damageflytop(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 1.0);
Expand All @@ -116,7 +116,7 @@ unsafe extern "C" fn damageflytop_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn game_dash(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 14.0);
Expand All @@ -126,7 +126,7 @@ unsafe extern "C" fn dash_game(fighter: &mut L2CAgentBase) {

}

unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn sound_dash(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 4.0);
Expand All @@ -144,7 +144,7 @@ unsafe extern "C" fn dash_sound(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn game_turndash(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
frame(lua_state, 3.0);
Expand All @@ -158,7 +158,7 @@ unsafe extern "C" fn turn_dash_game(fighter: &mut L2CAgentBase) {

}

unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn game_escapeair(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();
let escape_air_cancel_frame = WorkModule::get_param_float(boma, hash40("param_motion"), hash40("escape_air_cancel_frame"));
Expand All @@ -173,7 +173,7 @@ unsafe extern "C" fn escape_air_game(fighter: &mut L2CAgentBase) {
}
}

unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) {
unsafe extern "C" fn game_escapeairslide(fighter: &mut L2CAgentBase) {
let lua_state = fighter.lua_state_agent;
let boma = fighter.boma();

Expand All @@ -187,17 +187,15 @@ unsafe extern "C" fn escape_air_slide_game(fighter: &mut L2CAgentBase) {
}
}

pub fn install() {
smashline::Agent::new("metaknight")
.acmd("sound_damageflyhi", damageflyhi_sound)
.acmd("sound_damageflylw", damageflylw_sound)
.acmd("sound_damageflyn", damageflyn_sound)
.acmd("sound_damageflyroll", damageflyroll_sound)
.acmd("sound_damageflytop", damageflytop_sound)
.acmd("game_dash", dash_game)
.acmd("sound_dash", dash_sound)
.acmd("game_turndash", turn_dash_game)
.acmd("game_escapeair", escape_air_game)
.acmd("game_escapeairslide", escape_air_slide_game)
.install();
pub fn install(agent: &mut Agent) {
agent.acmd("sound_damageflyhi", sound_damageflyhi);
agent.acmd("sound_damageflylw", sound_damageflylw);
agent.acmd("sound_damageflyn", sound_damageflyn);
agent.acmd("sound_damageflyroll", sound_damageflyroll);
agent.acmd("sound_damageflytop", sound_damageflytop);
agent.acmd("game_dash", game_dash);
agent.acmd("sound_dash", sound_dash);
agent.acmd("game_turndash", game_turndash);
agent.acmd("game_escapeair", game_escapeair);
agent.acmd("game_escapeairslide", game_escapeairslide);
}
Loading

0 comments on commit ffa4185

Please sign in to comment.