Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bingus the second #2244

Merged
merged 70 commits into from
Feb 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
62f0404
feature: Begin smashline 2 migration
blu-dev Feb 4, 2024
f5fffe1
refactor: Refactor common code to use smashline 2
blu-dev Feb 4, 2024
304d3b4
doc, luigi, & mario
blu-dev Feb 4, 2024
c241a15
Bayonetta, Hero
SkewedAskew Feb 4, 2024
e2a3d0b
Merge branch 'feature/smashline-2' of https://github.com/HDR-Developm…
SkewedAskew Feb 4, 2024
df9ab88
Falcon
SkewedAskew Feb 4, 2024
76847c1
falco, fox, & donkey
blu-dev Feb 4, 2024
49fe0ce
Chrom
SkewedAskew Feb 4, 2024
80389dc
wolf, yoshi, yink
blu-dev Feb 4, 2024
757bf0a
wiifit, wario, sora
blu-dev Feb 4, 2024
6455fc4
toonlink, minmin, zss
blu-dev Feb 4, 2024
580d43d
sonic, snake, simon
blu-dev Feb 4, 2024
49c81e0
shulk, issa, sheik, (dark) samus
blu-dev Feb 4, 2024
4641276
Cloud, Daisy, Dedede, Kazuya, Diddy, Terry
SkewedAskew Feb 4, 2024
764aa0f
Duck Hunt, Sephiroth, Aegis
SkewedAskew Feb 4, 2024
1d6a0bc
ryu, roy, rosetta, rockman, robot, ridley
blu-dev Feb 4, 2024
7225ac2
moar
blu-dev Feb 5, 2024
7c0e859
Merge branch 'dev' into feature/smashline-2
SkewedAskew Feb 5, 2024
7067750
Too many cooks
SkewedAskew Feb 6, 2024
fdcd28b
feature: Begin smashline 2 migration
blu-dev Feb 4, 2024
3fe452f
refactor: Refactor common code to use smashline 2
blu-dev Feb 4, 2024
a236cf7
Bayonetta, Hero
SkewedAskew Feb 4, 2024
3e80365
doc, luigi, & mario
blu-dev Feb 4, 2024
ae393ef
Falcon
SkewedAskew Feb 4, 2024
0e71400
falco, fox, & donkey
blu-dev Feb 4, 2024
42290f0
Chrom
SkewedAskew Feb 4, 2024
adeb625
wolf, yoshi, yink
blu-dev Feb 4, 2024
5113be4
wiifit, wario, sora
blu-dev Feb 4, 2024
2ec3596
toonlink, minmin, zss
blu-dev Feb 4, 2024
37af204
sonic, snake, simon
blu-dev Feb 4, 2024
4de298b
shulk, issa, sheik, (dark) samus
blu-dev Feb 4, 2024
4c42f5e
Cloud, Daisy, Dedede, Kazuya, Diddy, Terry
SkewedAskew Feb 4, 2024
9fbf1c8
Duck Hunt, Sephiroth, Aegis
SkewedAskew Feb 4, 2024
a73e40e
ryu, roy, rosetta, rockman, robot, ridley
blu-dev Feb 4, 2024
20aa2c9
moar
blu-dev Feb 5, 2024
79afe79
Too many cooks
SkewedAskew Feb 6, 2024
f272a88
further reorg
WuBoytH Feb 8, 2024
146518d
Merge branch 'feature/smashline-2' of https://github.com/HDR-Developm…
WuBoytH Feb 8, 2024
08912d1
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 11, 2024
f38f464
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 12, 2024
9c011ab
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 12, 2024
b335240
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 13, 2024
d6b56b7
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 18, 2024
99196df
Fixes
WuBoytH Feb 19, 2024
8257d40
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 19, 2024
abcd651
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 19, 2024
3b38b82
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 21, 2024
dfdb39e
P's
WuBoytH Feb 21, 2024
d022e2a
Robin/Richter
WuBoytH Feb 21, 2024
08df165
Fixes
WuBoytH Feb 21, 2024
3dddb72
Pull smashline_plugin instead of smashline_hook
WuBoytH Feb 21, 2024
7b99daf
Cleanup
WuBoytH Feb 21, 2024
34dfaae
Disable certain gamemodes (for now)
WuBoytH Feb 21, 2024
bf26482
Adjustments
WuBoytH Feb 21, 2024
a824b58
Remove all traces of custom status module
WuBoytH Feb 22, 2024
02812ed
The Whitespace Purge
WuBoytH Feb 22, 2024
bc6bbee
Spacing fixes
WuBoytH Feb 22, 2024
5509795
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 23, 2024
65c3261
Merge branch 'dev' into feature/smashline-2
WuBoytH Feb 23, 2024
208366f
cleanup
WuBoytH Feb 23, 2024
190698d
Update game_modes.rs
WuBoytH Feb 23, 2024
74852ce
Kirby fixes
WuBoytH Feb 23, 2024
d2e1be6
various fixes
WuBoytH Feb 23, 2024
42d89bc
Macros removal
WuBoytH Feb 24, 2024
64aaaa7
Ken ACMD fix
WuBoytH Feb 24, 2024
90f48a6
Warnings Fixes
WuBoytH Feb 24, 2024
e3bcb43
small cleanup
WuBoytH Feb 24, 2024
81a1c30
Update opff.rs
WuBoytH Feb 24, 2024
76bc745
Meter bugfixes
WuBoytH Feb 24, 2024
7140549
Update pr_build.yml
WuBoytH Feb 24, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/workflows/pr_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on:
pull_request:
branches:
- dev
types: [opened, reopened, synchronize, ready_for_review, edited]
types: [opened, reopened, synchronize, ready_for_review]

jobs:
pr_build:
Expand Down
5 changes: 2 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ edition = "2021"
skyline = "0.2"
skyline_smash = { git = "https://github.com/blu-dev/skyline-smash", features = ["weak_l2cvalue"] }
skyline-web = { git = "https://github.com/skyline-rs/skyline-web" }
smashline = { git = "https://github.com/blu-dev/smashline", branch = "development" }
smashline = { git = "https://github.com/HDR-Development/smashline" }

dynamic = { path = "dynamic" }
hdr-macros = { path = "hdr-macros" }
Expand Down Expand Up @@ -258,7 +258,7 @@ default = [
"ken",
"kirby",
"koopa",
"koopag",
# "koopag",
"koopajr",
"krool",
"link",
Expand Down Expand Up @@ -323,7 +323,6 @@ default = [
]
dev = ["utils/no-offset-search"]
main_nro = ["skyline-web", "common"]
add_status = []
runtime = []

[patch.'https://github.com/jam1garner/smash-arc']
Expand Down
53 changes: 29 additions & 24 deletions dynamic/src/consts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1475,68 +1475,73 @@ pub mod vars {

pub mod statuses {
pub mod elight {
pub const SPECIAL_HI_FINISH2: i32 = 0;
pub const SPECIAL_HI_FINISH2: i32 = 0x1F1;
}

pub mod falco {
pub const SPECIAL_LW_LOOP: i32 = 0;
pub const SPECIAL_LW_END: i32 = 1;
pub const SPECIAL_LW_LOOP: i32 = 0x1e8;
pub const SPECIAL_LW_END: i32 = 0x1e9;
}

pub mod gamewatch {
pub const SPECIAL_HI_OPEN: i32 = 0;
pub const SPECIAL_HI_OPEN: i32 = 0x205;
}

pub mod ganon {
pub const SPECIAL_N_FLOAT: i32 = 0;
pub const SPECIAL_N_FLOAT: i32 = 0x1EC;
}

pub mod ryu {
pub const AIR_DASH: i32 = 0;
pub const AIR_DASH: i32 = 0x202;
}

pub mod ken {
pub const ATTACK_COMMAND_4: i32 = 0;
pub const ATTACK_COMMAND_4: i32 = 0x202;
}

pub mod buddy {
pub const BUDDY_BAYONET_END: i32 = 0;
pub const BUDDY_BAYONET_END: i32 = 0x1FB;
}

pub mod littlemac {
pub const SPECIAL_LW_CANCEL: i32 = 1;
pub const SPECIAL_LW_CANCEL_JUMP: i32 = 2;
pub const SPECIAL_LW_CANCEL: i32 = 0x1F4;
pub const SPECIAL_LW_CANCEL_JUMP: i32 = 0x1F5;
}

pub mod wolf {
pub const SPECIAL_S_RUSH: i32 = 0;
pub const SPECIAL_S_END: i32 = 1;
pub const SPECIAL_S_RUSH: i32 = 0x1EA;
pub const SPECIAL_S_END: i32 = 0x1EB;
}

pub mod diddy {
pub const SPECIAL_N_CANCEL: i32 = 3;
pub const SPECIAL_N_CANCEL_JUMP: i32 = 4;
pub const SPECIAL_N_CANCEL: i32 = 0x1FF;
pub const SPECIAL_N_CANCEL_JUMP: i32 = 0x200;
}

pub mod kirby {
pub const SPECIAL_HI_H: i32 = 69; //Weird value to avoid conflicts with copy ability values
pub const SPECIAL_HI_H: i32 = 0x3E6; //Weird value to avoid conflicts with copy ability values
pub const GANON_SPECIAL_N_FLOAT: i32 = 0x3E7;
pub const LITTLEMAC_SPECIAL_N_CANCEL: i32 = 0x3E8;
pub const LITTLEMAC_SPECIAL_N_CANCEL_JUMP: i32 = 0x3E9;
pub const DIDDY_SPECIAL_N_CANCEL: i32 = 0x3EA;
pub const DIDDY_SPECIAL_N_CANCEL_JUMP: i32 = 0x3EB;
}

pub mod krool {
pub const SPECIAL_LW_GUT: i32 = 0;
pub const SPECIAL_LW_GUT: i32 = 0x1F9;
}

pub mod palutena {
pub const SPECIAL_N_R: i32 = 0;
pub const SPECIAL_N_B: i32 = 1;
pub const SPECIAL_N_Y: i32 = 2;
pub const SPECIAL_N_P: i32 = 3;
pub const SPECIAL_N_O: i32 = 4;
pub const SPECIAL_N_G: i32 = 5;
pub const SPECIAL_N_R: i32 = 0x1E9;
pub const SPECIAL_N_B: i32 = 0x1EA;
pub const SPECIAL_N_Y: i32 = 0x1EB;
pub const SPECIAL_N_P: i32 = 0x1EC;
pub const SPECIAL_N_O: i32 = 0x1ED;
pub const SPECIAL_N_G: i32 = 0x1EE;
}

pub mod bayonetta {
pub const SPECIAL_S_KICK: i32 = 0;
pub const SPECIAL_S_EDGE: i32 = 1;
pub const SPECIAL_S_KICK: i32 = 0x1F2;
pub const SPECIAL_S_EDGE: i32 = 0x1F3;
}
}
20 changes: 4 additions & 16 deletions dynamic/src/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -376,7 +376,6 @@ pub trait FastShift {
&mut self,
new_main: unsafe extern "C" fn(&mut L2CFighterBase) -> L2CValue,
) -> L2CValue;
fn change_to_custom_status(&mut self, id: i32, clear_cat: bool, common: bool);
}

impl MainShift for L2CFighterCommon {
Expand All @@ -395,18 +394,6 @@ impl FastShift for L2CFighterBase {
) -> L2CValue {
unsafe { self.fastshift(L2CValue::Ptr(new_main as *const () as _)) }
}

fn change_to_custom_status(&mut self, id: i32, clear_cat: bool, common: bool) {
use crate::CustomStatusModule;

let kind = if common {
CustomStatusModule::get_common_status_kind(self.battle_object, id)
} else {
CustomStatusModule::get_agent_status_kind(self.battle_object, id)
};

unsafe { self.change_status(kind.into(), clear_cat.into()) }
}
}

pub trait BomaExt {
Expand Down Expand Up @@ -922,7 +909,7 @@ impl BomaExt for BattleObjectModuleAccessor {

unsafe fn handle_waveland(&mut self, require_airdodge: bool) -> bool {
// MotionModule::frame(self) > 5.0 && !WorkModule::is_flag(self, *FIGHTER_STATUS_ESCAPE_FLAG_HIT_XLU);
if (require_airdodge && !self.is_status_one_of(&[*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE])) {
if require_airdodge && !self.is_status_one_of(&[*FIGHTER_STATUS_KIND_ESCAPE_AIR, *FIGHTER_STATUS_KIND_ESCAPE_AIR_SLIDE]) {
return false;
}

Expand Down Expand Up @@ -1141,8 +1128,8 @@ impl BomaExt for BattleObjectModuleAccessor {
//let p2_x = -9.6;
//let p2_y = 9.0;

self.set_front_cliff_hangdata(p1_x, (p1_y - p2_y));
self.set_back_cliff_hangdata((p2_x * -1.0), (p1_y - p2_y));
self.set_front_cliff_hangdata(p1_x, p1_y - p2_y);
self.set_back_cliff_hangdata(p2_x * -1.0, p1_y - p2_y);
self.set_center_cliff_hangdata(0.0, p2_y);
}

Expand Down Expand Up @@ -1419,6 +1406,7 @@ pub struct ControllerMapping {
}

/// Controller class used internally by the game
#[allow(non_snake_case)]
#[repr(C)]
pub struct Controller {
pub vtable: *const u64,
Expand Down
14 changes: 1 addition & 13 deletions dynamic/src/frame_info.rs
Original file line number Diff line number Diff line change
@@ -1,28 +1,16 @@
use smash::{
app::{
self,
sv_animcmd::{
frame,
wait
},
lua_bind::*
},
app::lua_bind::*,
lib::lua_const::*,
lib::L2CAgent,
lua2cpp::*,
phx::*
};
use smash_script::{
*,
macros::*
};
use crate::{
*,
consts::*,
ext::*
};


#[repr(C)]
pub struct FrameInfo {
pub lua_state: u64,
Expand Down
2 changes: 0 additions & 2 deletions dynamic/src/modules.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
mod var;
mod param;
mod input;
mod status;
mod meter;

pub use var::*;
pub use param::*;
pub use input::*;
pub use status::*;
pub use meter::*;
49 changes: 0 additions & 49 deletions dynamic/src/modules/status.rs

This file was deleted.

1 change: 0 additions & 1 deletion dynamic/src/offsets.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,6 @@ extern "C" {
fn offsets_analog_trigger_r() -> usize;
}


pub fn exec_command() -> usize {
unsafe {
offsets_exec_command()
Expand Down
1 change: 1 addition & 0 deletions dynamic/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ extern "C" {
fn ui_manager_set_robot_meter_info(entry_id: u32, current: f32, max: f32, per_level: f32);
}

#[allow(non_snake_case)]
pub mod UiManager {
pub fn set_dk_barrel_enable(entry_id: u32, enable: bool) {
unsafe {
Expand Down
11 changes: 5 additions & 6 deletions dynamic/src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ use smash::app::{BattleObject, BattleObjectModuleAccessor};
use smash::lua2cpp::L2CFighterCommon;
use crate::offsets;
use crate::ext::*;
use std::arch::asm;
// use std::arch::asm;
use smash::phx::Vector2f;
use crate::se;
// use crate::se;

#[macro_export]
macro_rules! dump_trace {
Expand Down Expand Up @@ -168,7 +168,7 @@ pub fn get_active_battle_object_id_from_entry_id(entry_id: u32) -> Option<u32> {
pub unsafe fn get_all_active_battle_object_ids() -> Vec<u32> {
use smash::lib::lua_const::*;
use smash::app::lua_bind::*;
use super::ext::*;
// use super::ext::*;
let mut vec: Vec<u32> = Vec::new();
for entry_id in 0..8 {
// get the active battle object id and add it to the list
Expand Down Expand Up @@ -253,8 +253,8 @@ struct SomeControllerStruct {
pub unsafe fn get_controller_from_id(player: usize) -> &'static Controller {
let base = *((skyline::hooks::getRegionAddress(skyline::hooks::Region::Text) as *mut u8)
.add(0x5339860) as *const u64);
let uVar3 = *((base + 0x298 + (4 * (player as u64))) as *const u32);
let controller_struct = ((base + (0x8 * (uVar3 as i32)) as u64) as *mut SomeControllerStruct);
let uvar3 = *((base + 0x298 + (4 * (player as u64))) as *const u32);
let controller_struct = (base + (0x8 * (uvar3 as i32)) as u64) as *mut SomeControllerStruct;
(*controller_struct).controller
}

Expand Down Expand Up @@ -308,7 +308,6 @@ pub unsafe fn x_motion_vec(val: f32, stick_x: f32) -> smash::phx::Vector3f {
smash::phx::Vector3f{x: val * stick_x.signum(), y: 0.0, z: 0.0}
}


extern "C"{
/// gets whether we are in training mode
#[link_name = "\u{1}_ZN3app9smashball16is_training_modeEv"]
Expand Down
2 changes: 1 addition & 1 deletion fighters/bayonetta/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ utils = { package = "dynamic", path = "../../dynamic" }
skyline = "0.2.1"
skyline_smash = { git = "https://github.com/blu-dev/skyline-smash", features = ["weak_l2cvalue"] }
smash_script = { git = "https://github.com/blu-dev/smash-script", branch = "development" }
smashline = { git = "https://github.com/blu-dev/smashline", branch = "development" }
smashline = { git = "https://github.com/HDR-Development/smashline" }
Loading
Loading