Running Shoes, new readme, Munchlax

This adds a readme with credits so far. Make sure to keep this updated so everyone knows what is and isn't done!

We also get the Running Shoes feature from the tutorial, finally making debugging bearable given how laggy Crystal's overworld can be at times.

Oh, and Munchlax.
This commit is contained in:
Llinos Evans 2023-10-27 21:59:33 +01:00
parent bd6b73b04b
commit c1fa88db2a
45 changed files with 209 additions and 6 deletions

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