Exiting level while underwater doesn't resume volume. And it doesn't matter if in water or not anymore.
And comparisons you have could use optimizations:
Code
LDA $75 ;check if mario...
CMP #$01 ;is swimming
BEQ swimming ;if so, branch
can be
Code
LDA $75 ;check if mario...
BNE swimming ;if swimming, branch
and
Code
LDA !Trigger|!addr ;check trigger to make sure the
CMP #$00 ;quiet volume sound doesn't play multiple times
BNE return
can be
Code
LDA !Trigger|!addr ;check trigger to make sure the
BNE return ;quiet volume sound doesn't play multiple times
since you're checking flags, they can be either 0 or anything else. if you want to check if flag is zero, just having BEQ after LDA is enough (branches on zero), and if non-zero - use BNE (branches on non-zero value)
Follow Us On