Merge branch 'ZetaNull:master' into master

This commit is contained in:
thornAvery 2023-10-31 02:46:21 +11:00 committed by GitHub
commit b02af8e936
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
264 changed files with 2243 additions and 283 deletions

View file

@ -158,7 +158,7 @@ ItemEffects:
dw EvoStoneEffect ; SHINY_STONE
dw NoEffect ; METAL_COAT
dw NoEffect ; DRAGON_FANG
dw NoEffect ; ITEM_91
dw EvoStoneEffect ; BLK_AUGURITE
dw NoEffect ; LEFTOVERS
dw NoEffect ; ITEM_93
dw NoEffect ; ITEM_94

View file

@ -284,6 +284,14 @@ PlayerEvents:
xor a
ld [wLandmarkSignTimer], a
; Have player stand (resets running sprite to standing if event starts while running)
ld a, [wPlayerState]
cp PLAYER_RUN
jr nz, .ok2
ld a, PLAYER_NORMAL
ld [wPlayerState], a
farcall UpdatePlayerSprite
.ok2
scf
ret

View file

@ -276,7 +276,8 @@ DoPlayerMovement::
; Downhill riding is slower when not moving down.
call .BikeCheck
jr nz, .walk
;jr nz, .walk
jr nz, .HandleWalkAndRun
ld hl, wBikeFlags
bit BIKEFLAGS_DOWNHILL_F, [hl]
@ -317,6 +318,25 @@ DoPlayerMovement::
xor a
ret
.HandleWalkAndRun
ld a, [wWalkingDirection]
cp STANDING
jr z, .ensurewalk
ldh a, [hJoypadDown]
and B_BUTTON
cp B_BUTTON
jr nz, .ensurewalk
ld a, [wPlayerState]
cp PLAYER_RUN
call nz, .StartRunning
jr .fast
.ensurewalk
ld a, [wPlayerState]
cp PLAYER_NORMAL
call nz, .StartWalking
jr .walk
.TrySurf:
call .CheckSurfPerms
ld [wWalkingIntoLand], a
@ -783,6 +803,22 @@ ENDM
pop bc
ret
.StartRunning:
ld a, PLAYER_RUN
ld [wPlayerState], a
push bc
farcall UpdatePlayerSprite
pop bc
ret
.StartWalking:
ld a, PLAYER_NORMAL
ld [wPlayerState], a
push bc
farcall UpdatePlayerSprite
pop bc
ret
CheckStandingOnIce::
ld a, [wPlayerTurningDirection]
cp 0