You've already forked pokecrystal-board
mirror of
https://gitlab.com/xCrystal/pokecrystal-board.git
synced 2025-09-08 08:13:02 -07:00
Restored StandingTile and introduced LastTile
This commit is contained in:
28
home/map.asm
28
home/map.asm
@@ -256,10 +256,10 @@ GetDestinationWarpNumber:: ; 2252
|
||||
; 2266
|
||||
|
||||
.GetDestinationWarpNumber ; 2266
|
||||
ld a, [PlayerNextMapY]
|
||||
ld a, [PlayerStandingMapY]
|
||||
sub $4
|
||||
ld e, a
|
||||
ld a, [PlayerNextMapX]
|
||||
ld a, [PlayerStandingMapX]
|
||||
sub $4
|
||||
ld d, a
|
||||
ld a, [wCurrMapWarpCount]
|
||||
@@ -1568,16 +1568,16 @@ GetMovementPermissions:: ; 2914
|
||||
call .LeftRight
|
||||
call .UpDown
|
||||
; get coords of current tile
|
||||
ld a, [PlayerNextMapX]
|
||||
ld a, [PlayerStandingMapX]
|
||||
ld d, a
|
||||
ld a, [PlayerNextMapY]
|
||||
ld a, [PlayerStandingMapY]
|
||||
ld e, a
|
||||
call GetCoordTile
|
||||
ld [PlayerNextTile], a
|
||||
ld [PlayerStandingTile], a
|
||||
call .CheckHiNybble
|
||||
ret nz
|
||||
|
||||
ld a, [PlayerNextTile]
|
||||
ld a, [PlayerStandingTile]
|
||||
and 7
|
||||
ld hl, .MovementPermissionsData
|
||||
add l
|
||||
@@ -1597,9 +1597,9 @@ GetMovementPermissions:: ; 2914
|
||||
; 294d
|
||||
|
||||
.UpDown
|
||||
ld a, [PlayerNextMapX]
|
||||
ld a, [PlayerStandingMapX]
|
||||
ld d, a
|
||||
ld a, [PlayerNextMapY]
|
||||
ld a, [PlayerStandingMapY]
|
||||
ld e, a
|
||||
|
||||
push de
|
||||
@@ -1617,9 +1617,9 @@ GetMovementPermissions:: ; 2914
|
||||
; 296c
|
||||
|
||||
.LeftRight
|
||||
ld a, [PlayerNextMapX]
|
||||
ld a, [PlayerStandingMapX]
|
||||
ld d, a
|
||||
ld a, [PlayerNextMapY]
|
||||
ld a, [PlayerStandingMapY]
|
||||
ld e, a
|
||||
|
||||
push de
|
||||
@@ -1744,10 +1744,10 @@ GetFacingTileCoord:: ; 2a07
|
||||
ld h, [hl]
|
||||
ld l, a
|
||||
|
||||
ld a, [PlayerNextMapX]
|
||||
ld a, [PlayerStandingMapX]
|
||||
add d
|
||||
ld d, a
|
||||
ld a, [PlayerNextMapY]
|
||||
ld a, [PlayerStandingMapY]
|
||||
add e
|
||||
ld e, a
|
||||
ld a, [hl]
|
||||
@@ -1922,10 +1922,10 @@ CheckCurrentMapXYTriggers:: ; 2ad4
|
||||
call CheckTriggers
|
||||
ld b, a
|
||||
; Load your current coordinates into de. This will be used to check if your position is in the xy-trigger table for the current map.
|
||||
ld a, [PlayerNextMapX]
|
||||
ld a, [PlayerStandingMapX]
|
||||
sub 4
|
||||
ld d, a
|
||||
ld a, [PlayerNextMapY]
|
||||
ld a, [PlayerStandingMapY]
|
||||
sub 4
|
||||
ld e, a
|
||||
|
||||
|
||||
@@ -79,15 +79,15 @@ DoesSpriteHaveFacings:: ; 1836
|
||||
|
||||
|
||||
|
||||
Function184a:: ; 184a
|
||||
ld a, [PlayerNextTile]
|
||||
GetPlayerStandingTile:: ; 184a
|
||||
ld a, [PlayerStandingTile]
|
||||
call GetTileCollision
|
||||
ld b, a
|
||||
ret
|
||||
; 1852
|
||||
|
||||
CheckOnWater:: ; 1852
|
||||
ld a, [PlayerNextTile]
|
||||
ld a, [PlayerStandingTile]
|
||||
call GetTileCollision
|
||||
sub 1
|
||||
ret z
|
||||
@@ -125,17 +125,6 @@ GetTileCollision:: ; 185d
|
||||
|
||||
|
||||
CheckGrassTile:: ; 1875
|
||||
; and %00110111
|
||||
; cp $10
|
||||
; ret c
|
||||
; cp $30
|
||||
; jr nc, .okay
|
||||
; scf
|
||||
; ret
|
||||
; .okay
|
||||
; xor a
|
||||
; ret
|
||||
|
||||
ld d, a
|
||||
and $f0
|
||||
cp $10
|
||||
@@ -222,7 +211,7 @@ CheckWaterfallTile:: ; 18bd
|
||||
; 18c3
|
||||
|
||||
CheckStandingOnEntrance:: ; 18c3
|
||||
ld a, [PlayerNextTile]
|
||||
ld a, [PlayerStandingTile]
|
||||
cp $71 ; door
|
||||
ret z
|
||||
cp $79
|
||||
|
||||
Reference in New Issue
Block a user