Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; SMB Deluxe
- ; Auto-calculate the X position where Mario stops moving, when running forward
- ; after the axe in castle levels. Replaces vanilla code to load hardcoded X
- ; positions for each world in Original/Challenge/Super Players mode.
- ;
- ; For assembling with WLA DX
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- ; Base defines
- .memorymap
- slotsize $4000
- defaultslot 1
- slot 0 $0000
- slot 1 $4000
- .endme
- .rombanksize $4000
- .rombanks $40
- .computegbchecksum
- .background "smbdx.gbc"
- .define W_ChallengeFlag $C283
- .define H_PlayerXHigh $FFA8
- ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
- .bank $03 slot 1
- .orga $503E
- .section "AxeVictory_PlayerStopX auto-calculate" size $5070-$503E overwrite
- ldh a,[<H_PlayerXHigh] ;\ Set stop position high byte
- inc a ;| to player X high, +1
- ld [$C267],a ;/
- ld a,[W_ChallengeFlag]
- and a
- jr nz,@Challenge
- ld a,$50 ;\ Non-challenge:
- ld [$C265],a ;/ Always use $50 for low byte
- ret
- @Challenge:
- ld a,$60 ;\ Challenge:
- ld [$C265],a ;/ Always use $60 for low byte
- ret
- .ends
Advertisement
Add Comment
Please, Sign In to add comment