Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Bro Switch SMW
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- !switch_timer = $58
- !time_between_switches = $1F3B
- !hard_mode = $1F48
- ORG $00A1DA
- JSR level_hijack
- ORG $00A087
- JSR overworld_load_hijack
- ORG $0489B1
- JSR hard_mode_display
- ORG $008FCB
- JSL update_status_bar
- JMP $8FD8
- ORG $00A249
- level_hijack:
- JSL level_tick
- LDA $1426
- RTS
- overworld_load_hijack:
- JSR $937D
- JSL overworld_load
- RTS
- ORG $04FFB1
- hard_mode_display:
- PHA
- LDA !hard_mode
- LSR A
- PLA
- BCC .no
- CLC
- ADC #$0400
- .no:
- RTS
- ORG $05DC46
- level_tick:
- LDA $13
- AND #$03
- BNE .done
- LDA !switch_timer
- BNE .no_init
- LDA !time_between_switches
- .no_init:
- DEC A
- STA !switch_timer
- BEQ .switch
- AND #%11100111
- BNE .done
- LDA #$23
- STA $1DFC
- .done:
- RTL
- .switch:
- LDA #$29
- STA $1DFC
- JSL get_new_switch_time
- LDA !time_between_switches
- STA !switch_timer
- LDA $0DB3
- EOR #$01
- STA $0DB3
- RTL
- overworld_load:
- STZ $0DB3
- LDA $0DA2
- ORA $0DA3
- AND #%00110000
- CMP #%00110000
- BNE .no_hard_mode
- LDA !hard_mode
- EOR #$01
- STA !hard_mode
- .no_hard_mode:
- JSL get_new_switch_time
- RTL
- get_new_switch_time:
- LDA !hard_mode
- BEQ .no_hard_mode
- LDA #$08
- BRA .done
- .no_hard_mode:
- LDA $13
- EOR $94
- ORA #$1C
- AND #$7F
- .done:
- STA !time_between_switches
- RTL
- update_status_bar:
- PHP
- PHB
- PHK
- PLB
- ASL A
- TAX
- LDY #$04
- .loop:
- REP #$20
- LDA status_bar_names,X
- STA $00
- SEP #$20
- LDA ($00),Y
- STA $0EF9,Y
- DEY
- BPL .loop
- PLB
- PLP
- RTL
- status_bar_names:
- dw mario,luigi
- mario:
- db $30,$31,$32,$33,$34
- luigi:
- db $40,$41,$42,$43,$44
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement