28
home/map.asm
28
home/map.asm
@@ -246,10 +246,10 @@ GetDestinationWarpNumber::
|
||||
ret
|
||||
|
||||
.GetDestinationWarpNumber:
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
sub 4
|
||||
ld e, a
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
sub 4
|
||||
ld d, a
|
||||
ld a, [wCurMapWarpCount]
|
||||
@@ -1514,16 +1514,16 @@ GetMovementPermissions::
|
||||
call .LeftRight
|
||||
call .UpDown
|
||||
; get coords of current tile
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
ld d, a
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
ld e, a
|
||||
call GetCoordTile
|
||||
ld [wPlayerStandingTile], a
|
||||
ld [wPlayerTile], a
|
||||
call .CheckHiNybble
|
||||
ret nz
|
||||
|
||||
ld a, [wPlayerStandingTile]
|
||||
ld a, [wPlayerTile]
|
||||
and 7
|
||||
ld hl, .MovementPermissionsData
|
||||
add l
|
||||
@@ -1548,9 +1548,9 @@ GetMovementPermissions::
|
||||
db UP_MASK | LEFT_MASK
|
||||
|
||||
.UpDown:
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
ld d, a
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
ld e, a
|
||||
|
||||
push de
|
||||
@@ -1567,9 +1567,9 @@ GetMovementPermissions::
|
||||
ret
|
||||
|
||||
.LeftRight:
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
ld d, a
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
ld e, a
|
||||
|
||||
push de
|
||||
@@ -1688,10 +1688,10 @@ GetFacingTileCoord::
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
add d
|
||||
ld d, a
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
add e
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
@@ -1861,10 +1861,10 @@ CheckCurrentMapCoordEvents::
|
||||
call CheckScenes
|
||||
ld b, a
|
||||
; Load your current coordinates into de. This will be used to check if your position is in the coord event table for the current map.
|
||||
ld a, [wPlayerStandingMapX]
|
||||
ld a, [wPlayerMapX]
|
||||
sub 4
|
||||
ld d, a
|
||||
ld a, [wPlayerStandingMapY]
|
||||
ld a, [wPlayerMapY]
|
||||
sub 4
|
||||
ld e, a
|
||||
|
||||
|
Reference in New Issue
Block a user