Skip to content

Commit

Permalink
player animation is faster when running
Browse files Browse the repository at this point in the history
  • Loading branch information
jojobear13 committed Dec 16, 2020
1 parent 11caf74 commit 34b1776
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 4 deletions.
2 changes: 1 addition & 1 deletion custom_functions/func_overworld.asm
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TrainerRematch:


;this function handles tracking of how bast to go on or off a bike
;this function handles tracking of how fast to go on or off a bike
;biking ORs with $2
;running by holding B ORs with $1
TrackRunBikeSpeed:
Expand Down
1 change: 1 addition & 0 deletions data/base_stats.asm
Original file line number Diff line number Diff line change
Expand Up @@ -149,3 +149,4 @@ INCLUDE "data/baseStats/dragonair.asm"
INCLUDE "data/baseStats/dragonite.asm"
INCLUDE "data/baseStats/mewtwo.asm"
INCLUDE "data/baseStats/mew.asm" ;mew should have been put here had it not been added so late in the game's development
INCLUDE "data/baseStats/missingno.asm" ;joenote - added basestats for missingno
23 changes: 21 additions & 2 deletions engine/overworld/movement.asm
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,27 @@ UpdatePlayerSprite:
ld a, [hl]
inc a
ld [hl], a
cp 4
jr nz, .calcImageIndex
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;joenote - If B is being held to go faster and full joypad is enabled (i.e. not in a cutscene),
;Then increase player animation speed by 25%
push bc
ld c, 4
ld b, a
ld a, [wJoyIgnore]
and a
jr nz, .doneSpeed
ld a, [hJoyHeld]
and B_BUTTON
jr z, .doneSpeed
ld c, 3
.doneSpeed
ld a, b
cp c
pop bc
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; cp 4
; jr nz, .calcImageIndex
jr c, .calcImageIndex ;joenote - prevents interframe counter from increasing forever
xor a
ld [hl], a
inc hl
Expand Down
1 change: 0 additions & 1 deletion main.asm
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ INCLUDE "engine/black_out.asm"
;MewPicFront:: INCBIN "pic/bmon/mew.pic" ;moved to a proper rom bank
;MewPicBack:: INCBIN "pic/monback/mewb.pic"
;INCLUDE "data/baseStats/mew.asm" ;this has been moved to be with the other pokemon base stat files
INCLUDE "data/baseStats/missingno.asm" ;joenote - added basestats for missingno

INCLUDE "engine/battle/safari_zone.asm"

Expand Down

0 comments on commit 34b1776

Please sign in to comment.