Skip to content

Commit b95fb7e

Browse files
committed
Merge remote-tracking branch 'upstream/dev' into mewtwo-tp-jump
2 parents 61937f6 + e683c7c commit b95fb7e

File tree

1,290 files changed

+20155
-26048
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,290 files changed

+20155
-26048
lines changed

.github/workflows/pr_build.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ on:
33
pull_request:
44
branches:
55
- dev
6-
types: [opened, reopened, synchronize, ready_for_review, edited]
6+
types: [opened, reopened, synchronize, ready_for_review]
77

88
jobs:
99
pr_build:

Cargo.toml

+2-3
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ edition = "2021"
1212
skyline = "0.2"
1313
skyline_smash = { git = "https://github.com/blu-dev/skyline-smash", features = ["weak_l2cvalue"] }
1414
skyline-web = { git = "https://github.com/skyline-rs/skyline-web" }
15-
smashline = { git = "https://github.com/blu-dev/smashline", branch = "development" }
15+
smashline = { git = "https://github.com/HDR-Development/smashline" }
1616

1717
dynamic = { path = "dynamic" }
1818
hdr-macros = { path = "hdr-macros" }
@@ -258,7 +258,7 @@ default = [
258258
"ken",
259259
"kirby",
260260
"koopa",
261-
"koopag",
261+
# "koopag",
262262
"koopajr",
263263
"krool",
264264
"link",
@@ -323,7 +323,6 @@ default = [
323323
]
324324
dev = ["utils/no-offset-search"]
325325
main_nro = ["skyline-web", "common"]
326-
add_status = []
327326
runtime = []
328327

329328
[patch.'https://github.com/jam1garner/smash-arc']

dynamic/src/consts.rs

+30-25
Original file line numberDiff line numberDiff line change
@@ -374,10 +374,10 @@ pub mod vars {
374374
pub mod instance {
375375
// flags
376376
pub use super::super::roy::instance::TRAIL_EFFECT;
377+
pub const SOARING_SLASH_HIT: i32 = 0x0100;
377378
}
378379
pub mod status {
379380
// flags
380-
pub const SOARING_SLASH_HIT: i32 = 0x1100;
381381
pub const SOARING_SLASH_CANCEL: i32 = 0x1101;
382382
}
383383
}
@@ -1474,68 +1474,73 @@ pub mod vars {
14741474

14751475
pub mod statuses {
14761476
pub mod elight {
1477-
pub const SPECIAL_HI_FINISH2: i32 = 0;
1477+
pub const SPECIAL_HI_FINISH2: i32 = 0x1F1;
14781478
}
14791479

14801480
pub mod falco {
1481-
pub const SPECIAL_LW_LOOP: i32 = 0;
1482-
pub const SPECIAL_LW_END: i32 = 1;
1481+
pub const SPECIAL_LW_LOOP: i32 = 0x1e8;
1482+
pub const SPECIAL_LW_END: i32 = 0x1e9;
14831483
}
14841484

14851485
pub mod gamewatch {
1486-
pub const SPECIAL_HI_OPEN: i32 = 0;
1486+
pub const SPECIAL_HI_OPEN: i32 = 0x205;
14871487
}
14881488

14891489
pub mod ganon {
1490-
pub const SPECIAL_N_FLOAT: i32 = 0;
1490+
pub const SPECIAL_N_FLOAT: i32 = 0x1EC;
14911491
}
14921492

14931493
pub mod ryu {
1494-
pub const AIR_DASH: i32 = 0;
1494+
pub const AIR_DASH: i32 = 0x202;
14951495
}
14961496

14971497
pub mod ken {
1498-
pub const ATTACK_COMMAND_4: i32 = 0;
1498+
pub const ATTACK_COMMAND_4: i32 = 0x202;
14991499
}
15001500

15011501
pub mod buddy {
1502-
pub const BUDDY_BAYONET_END: i32 = 0;
1502+
pub const BUDDY_BAYONET_END: i32 = 0x1FB;
15031503
}
15041504

15051505
pub mod littlemac {
1506-
pub const SPECIAL_LW_CANCEL: i32 = 1;
1507-
pub const SPECIAL_LW_CANCEL_JUMP: i32 = 2;
1506+
pub const SPECIAL_LW_CANCEL: i32 = 0x1F4;
1507+
pub const SPECIAL_LW_CANCEL_JUMP: i32 = 0x1F5;
15081508
}
15091509

15101510
pub mod wolf {
1511-
pub const SPECIAL_S_RUSH: i32 = 0;
1512-
pub const SPECIAL_S_END: i32 = 1;
1511+
pub const SPECIAL_S_RUSH: i32 = 0x1EA;
1512+
pub const SPECIAL_S_END: i32 = 0x1EB;
15131513
}
15141514

15151515
pub mod diddy {
1516-
pub const SPECIAL_N_CANCEL: i32 = 3;
1517-
pub const SPECIAL_N_CANCEL_JUMP: i32 = 4;
1516+
pub const SPECIAL_N_CANCEL: i32 = 0x1FF;
1517+
pub const SPECIAL_N_CANCEL_JUMP: i32 = 0x200;
15181518
}
15191519

15201520
pub mod kirby {
1521-
pub const SPECIAL_HI_H: i32 = 69; //Weird value to avoid conflicts with copy ability values
1521+
pub const SPECIAL_HI_H: i32 = 0x3E6; //Weird value to avoid conflicts with copy ability values
1522+
pub const GANON_SPECIAL_N_FLOAT: i32 = 0x3E7;
1523+
pub const LITTLEMAC_SPECIAL_N_CANCEL: i32 = 0x3E8;
1524+
pub const LITTLEMAC_SPECIAL_N_CANCEL_JUMP: i32 = 0x3E9;
1525+
pub const DIDDY_SPECIAL_N_CANCEL: i32 = 0x3EA;
1526+
pub const DIDDY_SPECIAL_N_CANCEL_JUMP: i32 = 0x3EB;
15221527
}
15231528

15241529
pub mod krool {
1525-
pub const SPECIAL_LW_GUT: i32 = 0;
1530+
pub const SPECIAL_LW_GUT: i32 = 0x1F9;
15261531
}
15271532

15281533
pub mod palutena {
1529-
pub const SPECIAL_N_R: i32 = 0;
1530-
pub const SPECIAL_N_B: i32 = 1;
1531-
pub const SPECIAL_N_Y: i32 = 2;
1532-
pub const SPECIAL_N_P: i32 = 3;
1533-
pub const SPECIAL_N_O: i32 = 4;
1534-
pub const SPECIAL_N_G: i32 = 5;
1534+
pub const SPECIAL_N_R: i32 = 0x1E9;
1535+
pub const SPECIAL_N_B: i32 = 0x1EA;
1536+
pub const SPECIAL_N_Y: i32 = 0x1EB;
1537+
pub const SPECIAL_N_P: i32 = 0x1EC;
1538+
pub const SPECIAL_N_O: i32 = 0x1ED;
1539+
pub const SPECIAL_N_G: i32 = 0x1EE;
15351540
}
15361541

15371542
pub mod bayonetta {
1538-
pub const SPECIAL_S_KICK: i32 = 0;
1539-
pub const SPECIAL_S_EDGE: i32 = 1;
1543+
pub const SPECIAL_S_KICK: i32 = 0x1F2;
1544+
pub const SPECIAL_S_EDGE: i32 = 0x1F3;
15401545
}
15411546
}

dynamic/src/ext.rs

+4-16
Original file line numberDiff line numberDiff line change
@@ -376,7 +376,6 @@ pub trait FastShift {
376376
&mut self,
377377
new_main: unsafe extern "C" fn(&mut L2CFighterBase) -> L2CValue,
378378
) -> L2CValue;
379-
fn change_to_custom_status(&mut self, id: i32, clear_cat: bool, common: bool);
380379
}
381380

382381
impl MainShift for L2CFighterCommon {
@@ -395,18 +394,6 @@ impl FastShift for L2CFighterBase {
395394
) -> L2CValue {
396395
unsafe { self.fastshift(L2CValue::Ptr(new_main as *const () as _)) }
397396
}
398-
399-
fn change_to_custom_status(&mut self, id: i32, clear_cat: bool, common: bool) {
400-
use crate::CustomStatusModule;
401-
402-
let kind = if common {
403-
CustomStatusModule::get_common_status_kind(self.battle_object, id)
404-
} else {
405-
CustomStatusModule::get_agent_status_kind(self.battle_object, id)
406-
};
407-
408-
unsafe { self.change_status(kind.into(), clear_cat.into()) }
409-
}
410397
}
411398

412399
pub trait BomaExt {
@@ -922,7 +909,7 @@ impl BomaExt for BattleObjectModuleAccessor {
922909

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

@@ -1141,8 +1128,8 @@ impl BomaExt for BattleObjectModuleAccessor {
11411128
//let p2_x = -9.6;
11421129
//let p2_y = 9.0;
11431130

1144-
self.set_front_cliff_hangdata(p1_x, (p1_y - p2_y));
1145-
self.set_back_cliff_hangdata((p2_x * -1.0), (p1_y - p2_y));
1131+
self.set_front_cliff_hangdata(p1_x, p1_y - p2_y);
1132+
self.set_back_cliff_hangdata(p2_x * -1.0, p1_y - p2_y);
11461133
self.set_center_cliff_hangdata(0.0, p2_y);
11471134
}
11481135

@@ -1419,6 +1406,7 @@ pub struct ControllerMapping {
14191406
}
14201407

14211408
/// Controller class used internally by the game
1409+
#[allow(non_snake_case)]
14221410
#[repr(C)]
14231411
pub struct Controller {
14241412
pub vtable: *const u64,

dynamic/src/frame_info.rs

+1-13
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,16 @@
11
use smash::{
2-
app::{
3-
self,
4-
sv_animcmd::{
5-
frame,
6-
wait
7-
},
8-
lua_bind::*
9-
},
2+
app::lua_bind::*,
103
lib::lua_const::*,
114
lib::L2CAgent,
125
lua2cpp::*,
136
phx::*
147
};
15-
use smash_script::{
16-
*,
17-
macros::*
18-
};
198
use crate::{
209
*,
2110
consts::*,
2211
ext::*
2312
};
2413

25-
2614
#[repr(C)]
2715
pub struct FrameInfo {
2816
pub lua_state: u64,

dynamic/src/modules.rs

-2
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
mod var;
22
mod param;
33
mod input;
4-
mod status;
54
mod meter;
65

76
pub use var::*;
87
pub use param::*;
98
pub use input::*;
10-
pub use status::*;
119
pub use meter::*;

dynamic/src/modules/status.rs

-49
This file was deleted.

dynamic/src/offsets.rs

-1
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ extern "C" {
6969
fn offsets_analog_trigger_r() -> usize;
7070
}
7171

72-
7372
pub fn exec_command() -> usize {
7473
unsafe {
7574
offsets_exec_command()

dynamic/src/ui.rs

+1
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ extern "C" {
5454
fn ui_manager_set_robot_meter_info(entry_id: u32, current: f32, max: f32, per_level: f32);
5555
}
5656

57+
#[allow(non_snake_case)]
5758
pub mod UiManager {
5859
pub fn set_dk_barrel_enable(entry_id: u32, enable: bool) {
5960
unsafe {

dynamic/src/util.rs

+5-6
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ use smash::app::{BattleObject, BattleObjectModuleAccessor};
22
use smash::lua2cpp::L2CFighterCommon;
33
use crate::offsets;
44
use crate::ext::*;
5-
use std::arch::asm;
5+
// use std::arch::asm;
66
use smash::phx::Vector2f;
7-
use crate::se;
7+
// use crate::se;
88

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

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

311-
312311
extern "C"{
313312
/// gets whether we are in training mode
314313
#[link_name = "\u{1}_ZN3app9smashball16is_training_modeEv"]

fighters/bayonetta/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,4 @@ utils = { package = "dynamic", path = "../../dynamic" }
1010
skyline = "0.2.1"
1111
skyline_smash = { git = "https://github.com/blu-dev/skyline-smash", features = ["weak_l2cvalue"] }
1212
smash_script = { git = "https://github.com/blu-dev/smash-script", branch = "development" }
13-
smashline = { git = "https://github.com/blu-dev/smashline", branch = "development" }
13+
smashline = { git = "https://github.com/HDR-Development/smashline" }

0 commit comments

Comments
 (0)