@@ -10,11 +10,11 @@ extern "C" {
10
10
11
11
#[ skyline:: hook( offset = 0x30F6DE0 ) ]
12
12
unsafe fn stub ( arg : u64 ) {
13
- if get_stage_id ( ) == 0x8f && get_current_stage_alt ( ) == 0 {
13
+ // if get_stage_id() == 0x8f && get_current_stage_alt() == 0 {
14
14
return ;
15
- } else {
16
- call_original ! ( arg) ;
17
- }
15
+ // } else {
16
+ // call_original!(arg);
17
+ // }
18
18
}
19
19
20
20
#[ skyline:: hook( offset = 0x5209c0 ) ]
@@ -23,9 +23,10 @@ unsafe fn area_manager_process(manager: *const u64) {
23
23
let end = * manager. add ( 2 ) ;
24
24
while start != end {
25
25
let current = * ( start as * const u64 ) ;
26
- if * ( current as * mut u8 ) . add ( 0x20 ) == 0x1b
27
- && ( get_stage_id ( ) == 0x8f && get_current_stage_alt ( ) == 0 )
28
- {
26
+ // if *(current as *mut u8).add(0x20) == 0x1b
27
+ // && (get_stage_id() == 0x8f && get_current_stage_alt() == 0)
28
+ // {
29
+ if * ( current as * mut u8 ) . add ( 0x20 ) == 0x1b && get_stage_id ( ) == 0x8f {
29
30
* ( current as * mut bool ) . add ( 0x21 ) = false ;
30
31
* ( ( current + 0x40 ) as * mut f32 ) = 0.0 ;
31
32
* ( ( current + 0x40 ) as * mut f32 ) . add ( 1 ) = 0.0 ;
@@ -57,9 +58,10 @@ static HAZARDLESS_STAGE_IDS: &[u32] = &[
57
58
#[ skyline:: hook( offset = 0x178ab60 , inline) ]
58
59
unsafe fn init_stage ( ctx : & mut skyline:: hooks:: InlineCtx ) {
59
60
let stage_id = * ctx. registers [ 1 ] . w . as_ref ( ) ;
60
- let is_alt_haz_off = ( [ 0x59 ] . contains ( & stage_id) && get_current_stage_alt ( ) == 0 )
61
- || ( stage_id == 0x68 && get_current_stage_alt ( ) == 0 ) ;
62
- if HAZARDLESS_STAGE_IDS . contains ( & stage_id) || is_alt_haz_off {
61
+ // let is_alt_haz_off = ([0x59].contains(&stage_id) && get_current_stage_alt() == 0)
62
+ // || (stage_id == 0x68 && get_current_stage_alt() == 0);
63
+ // if HAZARDLESS_STAGE_IDS.contains(&stage_id) || is_alt_haz_off {
64
+ if HAZARDLESS_STAGE_IDS . contains ( & stage_id) || stage_id == 0x68 || stage_id == 0x59 {
63
65
* ctx. registers [ 3 ] . w . as_mut ( ) = 0 ;
64
66
}
65
67
}
@@ -76,9 +78,10 @@ unsafe fn handle_movement_grav_update(ctx: &mut skyline::hooks::InlineCtx) {
76
78
unsafe fn fix_hazards_for_online ( ctx : & skyline:: hooks:: InlineCtx ) {
77
79
let ptr = * ctx. registers [ 1 ] . x . as_ref ( ) ;
78
80
let stage_id = * ( ptr as * const u16 ) as u32 ;
79
- let is_alt_haz_off = ( [ 0x59 ] . contains ( & stage_id) && get_current_stage_alt ( ) == 0 )
80
- || ( stage_id == 0x68 && get_current_stage_alt ( ) == 0 ) ;
81
- if HAZARDLESS_STAGE_IDS . contains ( & stage_id) || is_alt_haz_off {
81
+ // let is_alt_haz_off = ([0x59].contains(&stage_id) && get_current_stage_alt() == 0)
82
+ // || (stage_id == 0x68 && get_current_stage_alt() == 0);
83
+ // if HAZARDLESS_STAGE_IDS.contains(&stage_id) || is_alt_haz_off {
84
+ if HAZARDLESS_STAGE_IDS . contains ( & stage_id) || stage_id == 0x68 || stage_id == 0x59 {
82
85
* ( ptr as * mut bool ) . add ( 0x10 ) = false ;
83
86
}
84
87
}
@@ -97,11 +100,11 @@ unsafe fn lylat_no_rot(ctx: &mut skyline::hooks::InlineCtx) {
97
100
// 0x4 - default haz off space
98
101
#[ skyline:: hook( offset = 0x297D68C , inline) ]
99
102
unsafe fn lylat_set_form_hazards_off ( ctx : & mut skyline:: hooks:: InlineCtx ) {
100
- if get_current_stage_alt ( ) == 0 {
101
- * ctx. registers [ 8 ] . x . as_mut ( ) = 0x2 ;
102
- } else {
103
+ // if get_current_stage_alt() == 0 {
104
+ // *ctx.registers[8].x.as_mut() = 0x2;
105
+ // } else {
103
106
* ctx. registers [ 8 ] . x . as_mut ( ) = 0x4 ;
104
- }
107
+ // }
105
108
}
106
109
107
110
pub fn install ( ) {
0 commit comments