Different speed levels with certain item (bunny hood)

View previous topic View next topic Go down

20150802

Post 

Different speed levels with certain item (bunny hood)




This code lets you increase the speed in case you have a special item (in this code the moonpearl but you can of course change that.
Find the table where you can edit the new speed values at the end of the asm

Code:

; increase speed if moon pearl
; find the adjustable table at the end of this code
; db (0) $18: - Horizontal and vertical walking speed (Default = 18)
; db (1) $10 - Diagonal walking speed (Default = 10)
; db (2) $0a - Stairs walking speed (Default = 0A)

; db (0c) $14 - walking through heavy grass speed (also shallow water) (Default = 14)
; db (0d) $0d - walking diagonally through heavy grass speed (also shallow water) (Default = 0D)
; db (10) $40 - Pegasus boots speed (Default = 40)

lorom

org $87e330
JSR $FD66
CLC

org $87FD66
JSL $20af20
RTS

org $20af20
CPX #$11      ; security check (we only have $10 speed values)
bcs end
LDA $7ef357  ;have moon pearl?
BEQ end
LDA $20af70,x  ;load new speed values
CLC
RTL

end:
LDA $87E227,x ;load native speed values
CLC
RTL

org $20af70 ; this selects the new speed values
db $18, $10, $0a, $18, $10, $08, $08, $04, $0c, $10, $09, $19, $14, $0d, $10, $08, $40

avatar
Conn



Since : 2013-06-30

Back to top Go down

Share this post on: Excite BookmarksDiggRedditDel.icio.usGoogleLiveSlashdotNetscapeTechnoratiStumbleUponNewsvineFurlYahooSmarking

 
Permissions in this forum:
You cannot reply to topics in this forum