Advertisement
Zeldara109

Status Bar Disable Flag, fixed maybe?

Sep 30th, 2016
282
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.29 KB | None | 0 0
  1. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  2. ; Status Bar Disable Flag
  3. ; This version by Zeldara109, vaguely based on patch by DiscoTheBat found at
  4. ; http://www.smwcentral.net/?p=section&a=details&id=12483
  5. ; but with a few changes-- notably the status bar is disabled when the flag is
  6. ; set (not cleared), and the timer won't be paused when it's disabled
  7. ; I didn't thoroughly test this; feel free to report any bugs
  8. ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
  9.  
  10. !SBFlag = $1475 ; set to disable status bar
  11. ; this particular default address is cleared on overworld load, useful to prevent the flag from accidentally being carried over between levels (e.g. if the player Start-Selects out)
  12.  
  13. org $808275
  14. autoclean JML SBDisable3
  15. ; hijack the only branch to $008292 in the code
  16. ; $008292 itself can't be hijacked due to a jump from $008371 to $008294
  17.  
  18. freecode
  19.  
  20. SBDisable3:
  21. LDA $0D9B ; $008275 code
  22. BEQ + ; this was a BEQ to $008292
  23. JML $80827A ; if branch didn't occur, return
  24.  
  25. +
  26. LDA !SBFlag
  27. BNE .Disable ; if flag is set, disable
  28. JML $808292 ; if flag is cleared, start from $008292 as normal
  29.  
  30. .Disable
  31. JML $808297 ; if flag is set, skip LDY #$24 : LDA $4211
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement