Restored StandingTile and introduced LastTile

This commit is contained in:
PikalaxALT
2016-01-11 02:28:09 -05:00
parent 3dcbe0ff55
commit 1637d915d4
13 changed files with 333 additions and 120 deletions

View File

@@ -378,7 +378,7 @@ CheckTileEvent: ; 96874
ret
.warp_tile
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
call CheckPitTile
jr nz, .not_pit
ld a, PLAYEREVENT_FALL

View File

@@ -161,7 +161,7 @@ CanUseSweetScent:: ; 97cfd
jr nc, .no
.ice_check
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
call CheckIceTile
jr z, .no
scf
@@ -235,7 +235,7 @@ ChooseWildEncounter_BugContest:: ; 97d31
; 97d64
TryWildEncounter_BugContest: ; 97d64
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
call CheckSuperTallGrassTile
ld b, 40 percent
jr z, .ok

View File

@@ -234,14 +234,14 @@ CheckFacingObject:: ; 6fd9
call CheckCounterTile
jr nz, .asm_6ff1
ld a, [PlayerNextMapX]
ld a, [PlayerStandingMapX]
sub d
cpl
inc a
add d
ld d, a
ld a, [PlayerNextMapY]
ld a, [PlayerStandingMapY]
sub e
cpl
inc a
@@ -482,9 +482,9 @@ IsPersonMovingOffEdgeOfScreen: ; 70ed
; 7113
Function7113: ; unreferenced
ld a, [PlayerNextMapX]
ld a, [PlayerStandingMapX]
ld d, a
ld a, [PlayerNextMapY]
ld a, [PlayerStandingMapY]
ld e, a
ld bc, ObjectStructs
xor a

View File

@@ -118,7 +118,7 @@ DoPlayerMovement:: ; 80000
; Tiles such as waterfalls and warps move the player
; in a given direction, overriding input.
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
ld c, a
call CheckWhirlpoolTile
jr c, .asm_800c4
@@ -277,7 +277,7 @@ DoPlayerMovement:: ; 80000
cp 2
jr z, .bump
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
call CheckIceTile
jr nc, .ice
@@ -362,7 +362,7 @@ DoPlayerMovement:: ; 80000
; 801f3
.TryJump: ; 801f3
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
ld e, a
and $f0
cp $a0 ; ledge
@@ -413,7 +413,7 @@ DoPlayerMovement:: ; 80000
ld d, 0
ld hl, .EdgeWarps
add hl, de
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
cp [hl]
jr nz, .not_warp
@@ -615,7 +615,7 @@ DoPlayerMovement:: ; 80000
; tile collision pointer
.table1
db STANDING, FACE_CURRENT, 0, 0
dw PlayerNextTile
dw PlayerStandingTile
.table2
db RIGHT, FACE_RIGHT, 1, 0
dw TileRight
@@ -634,13 +634,13 @@ DoPlayerMovement:: ; 80000
ld a, 0
ld [hMapObjectIndexBuffer], a
; Load the next X coordinate into d
ld a, [PlayerNextMapX]
ld a, [PlayerStandingMapX]
ld d, a
ld a, [WalkingX]
add d
ld d, a
; Load the next Y coordinate into e
ld a, [PlayerNextMapY]
ld a, [PlayerStandingMapY]
ld e, a
ld a, [WalkingY]
add e
@@ -817,7 +817,7 @@ CheckStandingOnIce:: ; 80404
jr z, .not_ice
cp $f0
jr z, .not_ice
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
call CheckIceTile
jr nc, .yep
ld a, [PlayerState]

View File

@@ -1,6 +1,6 @@
CheckWarpCollision:: ; 1499a
; Is this tile a warp?
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
cp $60
jr z, .warp
cp $68
@@ -19,7 +19,7 @@ CheckWarpCollision:: ; 1499a
CheckDirectionalWarp:: ; 149af
; If this is a directional warp, clear carry (press the designated button to warp).
; Else, set carry (immediate warp).
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
cp $70 ; Warp on down
jr z, .not_warp
cp $76 ; Warp on left
@@ -39,7 +39,7 @@ CheckDirectionalWarp:: ; 149af
CheckWarpFacingDown: ; 149c6
ld de, 1
ld hl, .blocks
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
call IsInArray
ret
; 149d3
@@ -58,7 +58,7 @@ CheckWarpFacingDown: ; 149c6
; 149dd
CheckGrassCollision:: ; 149dd
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
ld hl, .blocks
ld de, 1
call IsInArray
@@ -98,7 +98,7 @@ CheckCutCollision: ; 149f5
; 14a07
Function14a07:: ; 14a07
ld a, [PlayerNextTile]
ld a, [PlayerStandingTile]
ld de, $1f
cp $71 ; door
ret z

View File

@@ -349,7 +349,7 @@ CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
ret
.down
ld a, [PlayerNextMapY]
ld a, [PlayerStandingMapY]
sub 4
ld b, a
ld a, [MapHeight]
@@ -360,7 +360,7 @@ CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
ret
.up
ld a, [PlayerNextMapY]
ld a, [PlayerStandingMapY]
sub 4
cp -1
jr z, .ok
@@ -368,7 +368,7 @@ CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
ret
.left
ld a, [PlayerNextMapX]
ld a, [PlayerStandingMapX]
sub $4
cp -1
jr z, .ok
@@ -376,7 +376,7 @@ CheckMovingOffEdgeOfMap:: ; 104820 (41:4820)
ret
.right
ld a, [PlayerNextMapX]
ld a, [PlayerStandingMapX]
sub 4
ld b, a
ld a, [MapWidth]