;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;100% bugfix walljump, By GreenHammerBro ;; ;; ;;list of fixes: ;; ;;-walljumping "away from the wall" (example: jump and presss right on the right side of ;;the wall at the same time) causes mario to jump away from the wall shorter than what he's ;;suppose to and in faster X speeds, it can "suck" mario into the wall and die. It uses ;;$7E:0093 to detect sides. ;; ;;-check mario's "status" like in the water (best for level that can switch between water ;;and dry), carrying something, and being in the air (so you can't walljump on the ground ;;if placed on the ground). ;; ;;-If mario's top half (his head) touches the side of the block, he cannot walljump ;; ;;tips: ;; ;;how set the left X speed distance to be the same speed as the right speed is to use this ;;formula: L=$100-R (so if left speed is #$60, then the R speed is #$A0 for example) ;; ;;Note: mario can walljump on the same wall without alternating walls by steering back ;;into the wall, If you don't want that, use the patch version, one of them disables ;;the d-pad to prevent mario from veering back into the same wall until the frame "timer" ;;goes back to zero again. This is more suitable for puzzle hacks due to not allowing ;;mario to walljump when holding an item. ;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; db $42 JMP return : JMP return : JMP MarioSide : JMP return : JMP return : JMP return : JMP return JMP return : JMP return : JMP MarioSide !left_jump = $D0 ;Left Jump speed (from close to far: $FF -> $80) !right_jump = $30 ;right Jump speed (from close to far: $01 -> $7F) !jump_height = $B0 ;upwards speed for both (from short to tall $FF -> $80) !sound_num = $02 ;Sound effect. Default: 02: sound when spinjumping on spikey !ram_sound_bank = $1DF9 ;ram address to play a sound. Default: $1DF9 MarioSide: LDA $73 ;>must not duck (must be zero) ORA $75 ;>must not be in water (must be zero), this is ;useful for levels that can switch between water and dry. ORA $187A ;>must be off yoshi (must be zero) ORA $1470 ;>must not be carrying something (must be zero) ORA $140D ;>must be normal jump (must be zero) BNE return ;>or be cement LDA $72 ;\and must be in the air (not zero) BEQ return ;/ LDA $16 ;\if not pressing jump AND #$80 ;| BEQ return ;/then return LDA $93 ;\if mario is touching the left side.. BEQ left_side ;/then use the left side code ;right side: LDA $15 ;\if not pressing left AND #$02 ;| BEQ return ;/then cement LDA #!right_jump ;\make mario jump right STA $7B ;/ BRA skip_left ;>and don't run the left code. left_side: LDA $15 ;\if not pressing right AND #$01 ;| BEQ return ;/then cement LDA #!left_jump ;\make mario jump left STA $7B ;/ skip_left: LDA #!jump_height ;\make mario jump vertically STA $7D ;/ LDA #!sound_num ;\effects and jump animation STA $1DF9 ;| JSL $01AB99 ;| LDA #$0B ;| STA $72 ;/ STZ $140D ;>don't jump off the wall spinning return: RTL print "A block that can be wall-jumped off."