Document that `farcall` returns `c` in `a` for some code (#937)

This commit is contained in:
Colton G. Rushton 2022-06-17 23:30:53 -03:00 committed by GitHub
parent 6a9e929bf9
commit 84a3b335aa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 0 deletions

View File

@ -1085,9 +1085,13 @@ TryTileCollisionEvent::
call GetFacingTileCoord
ld [wFacingTileID], a
ld c, a
; CheckFacingTileForStdScript preserves c, and
; farcall copies c back into a.
farcall CheckFacingTileForStdScript
jr c, .done
; CheckCutTreeTile expects a == [wFacingTileID], which
; it still is after the previous farcall.
call CheckCutTreeTile
jr nz, .whirlpool
farcall TryCutOW