@@ -19,67 +19,67 @@ unsafe fn steve_parry_stuff_fix(ctx: &mut skyline::hooks::InlineCtx) {
19
19
}
20
20
}
21
21
22
- #[ skyline:: hook( offset = 0x641814 , inline) ]
23
- unsafe fn shield_damage_analog ( ctx : & skyline:: hooks:: InlineCtx ) {
24
- let boma =
25
- * ( * ctx. registers [ 0 ] . x . as_ref ( ) as * const u64 ) . add ( 1 ) as * mut BattleObjectModuleAccessor ;
26
- let current_shield = WorkModule :: get_float ( boma, 6 ) ;
27
- let attack_power = * ( * ctx. registers [ 19 ] . x . as_ref ( ) as * const f32 ) . add ( 0xf730 / 4 ) ;
28
- let analog = InputModule :: get_analog_for_guard ( ( * boma) . object ( ) ) ;
29
- let damage_mul = WorkModule :: get_param_float (
30
- boma,
31
- smash:: hash40 ( "common" ) ,
32
- smash:: hash40 ( "shield_damage_mul" ) ,
33
- ) ;
34
- let damage_mul = if analog > 0.0 && analog < 1.0 {
35
- damage_mul + 0.2 * ( 1.0 - analog)
36
- } else {
37
- damage_mul
38
- } ;
39
- WorkModule :: set_float ( boma, current_shield - attack_power * damage_mul, 6 ) ;
40
- }
41
-
42
- #[ skyline:: hook( offset = 0x6285f0 , inline) ]
43
- unsafe fn shield_pushback_analog ( ctx : & skyline:: hooks:: InlineCtx ) {
44
- let fighter = * ctx. registers [ 19 ] . x . as_ref ( ) ;
45
- let boma = * ( fighter as * const u64 ) . add ( 4 ) ;
46
- let attack_module: u64 = * ( boma as * const u64 ) . add ( 0xa0 / 8 ) ;
47
- let transactor_count: u64 = * ( attack_module as * const u64 ) . add ( 0x20 / 8 ) ;
48
- let transactors: u64 = * ( attack_module as * const u64 ) . add ( 0x28 / 8 ) ;
49
-
50
- let mul = WorkModule :: get_param_float (
51
- boma as _ ,
52
- smash:: hash40 ( "common" ) ,
53
- smash:: hash40 ( "shield_rebound_speed_mul" ) ,
54
- ) ;
55
-
56
- for x in 0 ..transactor_count {
57
- let transactor = transactors + 720 * x;
58
- let p_list = * ( transactor as * const u64 ) . add ( 608 / 8 ) ;
59
- if p_list == 0 {
60
- continue ;
61
- }
62
-
63
- let mut current = * ( p_list as * const u64 ) ;
64
- while current != p_list && current != 0 {
65
- if * ( current as * const u8 ) . add ( 47 ) == 2 {
66
- let battle_object_id = * ( current as * const u32 ) . add ( 36 / 4 ) ;
67
- let object = utils:: util:: get_battle_object_from_id ( battle_object_id) ;
68
- let analog = InputModule :: get_analog_for_guard ( object) ;
69
- let mul = if analog > 0.0 && analog < 1.0 {
70
- mul * analog * 0.1
71
- } else {
72
- mul
73
- } ;
74
- std:: arch:: asm!( "fmov s0, w8" , in( "w8" ) mul) ;
75
- return ;
76
- }
22
+ // #[skyline::hook(offset = 0x641814, inline)]
23
+ // unsafe fn shield_damage_analog(ctx: &skyline::hooks::InlineCtx) {
24
+ // let boma =
25
+ // *(*ctx.registers[0].x.as_ref() as *const u64).add(1) as *mut BattleObjectModuleAccessor;
26
+ // let current_shield = WorkModule::get_float(boma, 6);
27
+ // let attack_power = *(*ctx.registers[19].x.as_ref() as *const f32).add(0xf730 / 4);
28
+ // let analog = InputModule::get_analog_for_guard((*boma).object());
29
+ // let damage_mul = WorkModule::get_param_float(
30
+ // boma,
31
+ // smash::hash40("common"),
32
+ // smash::hash40("shield_damage_mul"),
33
+ // );
34
+ // let damage_mul = if analog > 0.0 && analog < 1.0 {
35
+ // damage_mul + 0.2 * (1.0 - analog)
36
+ // } else {
37
+ // damage_mul
38
+ // };
39
+ // WorkModule::set_float(boma, current_shield - attack_power * damage_mul, 6);
40
+ // }
77
41
78
- current = * ( current as * const u64 ) ;
79
- }
80
- }
81
- std:: arch:: asm!( "fmov s0, w8" , in( "w8" ) mul) ;
82
- }
42
+ // #[skyline::hook(offset = 0x6285f0, inline)]
43
+ // unsafe fn shield_pushback_analog(ctx: &skyline::hooks::InlineCtx) {
44
+ // let fighter = *ctx.registers[19].x.as_ref();
45
+ // let boma = *(fighter as *const u64).add(4);
46
+ // let attack_module: u64 = *(boma as *const u64).add(0xa0 / 8);
47
+ // let transactor_count: u64 = *(attack_module as *const u64).add(0x20 / 8);
48
+ // let transactors: u64 = *(attack_module as *const u64).add(0x28 / 8);
49
+
50
+ // let mul = WorkModule::get_param_float(
51
+ // boma as _,
52
+ // smash::hash40("common"),
53
+ // smash::hash40("shield_rebound_speed_mul"),
54
+ // );
55
+
56
+ // for x in 0..transactor_count {
57
+ // let transactor = transactors + 720 * x;
58
+ // let p_list = *(transactor as *const u64).add(608 / 8);
59
+ // if p_list == 0 {
60
+ // continue;
61
+ // }
62
+
63
+ // let mut current = *(p_list as *const u64);
64
+ // while current != p_list && current != 0 {
65
+ // if *(current as *const u8).add(47) == 2 {
66
+ // let battle_object_id = *(current as *const u32).add(36 / 4);
67
+ // let object = utils::util::get_battle_object_from_id(battle_object_id);
68
+ // let analog = InputModule::get_analog_for_guard(object);
69
+ // let mul = if analog > 0.0 && analog < 1.0 {
70
+ // mul * analog * 0.1
71
+ // } else {
72
+ // mul
73
+ // };
74
+ // std::arch::asm!("fmov s0, w8", in("w8") mul);
75
+ // return;
76
+ // }
77
+
78
+ // current = *(current as *const u64);
79
+ // }
80
+ // }
81
+ // std::arch::asm!("fmov s0, w8", in("w8") mul);
82
+ // }
83
83
84
84
pub fn install ( ) {
85
85
smashline:: Agent :: new ( "fighter" )
0 commit comments