You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Implementation of basic navigation and movement across linear spaces (#24)
This commit is contained in:
@@ -11,19 +11,25 @@ DoPlayerMovement::
|
||||
ret
|
||||
|
||||
.GetDPad:
|
||||
ldh a, [hCurBoardEvent]
|
||||
cp BOARDEVENT_HANDLE_BOARD
|
||||
jr nz, .not_auto_in_board
|
||||
|
||||
; compute direction according to space layout and save to wCurInput
|
||||
farcall StepTowardsNextSpace
|
||||
ret
|
||||
|
||||
.not_auto_in_board
|
||||
ldh a, [hJoyDown]
|
||||
ld [wCurInput], a
|
||||
|
||||
; Standing downhill instead moves down.
|
||||
|
||||
ld hl, wBikeFlags
|
||||
bit BIKEFLAGS_DOWNHILL_F, [hl]
|
||||
ret z
|
||||
|
||||
ld c, a
|
||||
and D_PAD
|
||||
ret nz
|
||||
|
||||
ld a, c
|
||||
or D_DOWN
|
||||
ld [wCurInput], a
|
||||
|
||||
Reference in New Issue
Block a user