summaryrefslogtreecommitdiff
path: root/home
diff options
context:
space:
mode:
Diffstat (limited to 'home')
-rw-r--r--home/copy2.asm2
-rw-r--r--home/map.asm16
-rw-r--r--home/map_objects.asm26
-rw-r--r--home/tileset.asm20
4 files changed, 36 insertions, 28 deletions
diff --git a/home/copy2.asm b/home/copy2.asm
index 7274d8d..e74ef8b 100644
--- a/home/copy2.asm
+++ b/home/copy2.asm
@@ -3,7 +3,7 @@ INCLUDE "constants.asm"
SECTION "Video Copy functions", ROM0[$0D02]
RedrawPlayerSprite::
- jpab Function14000
+ jpab _RedrawPlayerSprite
LoadFont:: ; 00:0d0a
jpab LoadFontGraphics
diff --git a/home/map.asm b/home/map.asm
index 8c03d9f..21e41c8 100644
--- a/home/map.asm
+++ b/home/map.asm
@@ -448,8 +448,8 @@ FadeIn:: ; 23e5 ; This is not OverworldFadeIn, but I don't know what it is
ret
Function2407:: ; 00:2407
- ld a, $2a
- ld [wcb77], a
+ ld a, NO_MOVEMENT
+ ld [wPlayerMovement], a
xor a
ld [wPlayerAction], a
ld a, [wPlayerFacing]
@@ -505,7 +505,7 @@ CheckMovingOffEdgeOfMap:: ; 245e
ret
.down
- ld a, [wPlayerStandingMapY]
+ ld a, [wPlayerNextMapY]
sub 4
ld b, a
ld a, [wMapHeight]
@@ -516,7 +516,7 @@ CheckMovingOffEdgeOfMap:: ; 245e
ret
.up
- ld a, [wPlayerStandingMapY]
+ ld a, [wPlayerNextMapY]
sub 4
cp -1
jr z, .ok
@@ -524,7 +524,7 @@ CheckMovingOffEdgeOfMap:: ; 245e
ret
.left
- ld a, [wPlayerStandingMapX]
+ ld a, [wPlayerNextMapX]
sub 4
cp -1
jr z, .ok
@@ -532,7 +532,7 @@ CheckMovingOffEdgeOfMap:: ; 245e
ret
.right
- ld a, [wPlayerStandingMapX]
+ ld a, [wPlayerNextMapX]
sub 4
ld b, a
ld a, [wMapWidth]
@@ -701,10 +701,10 @@ WarpCheck:: ; 259f
ret
GetDestinationWarpPointer: ; 25b9
- ld a, [wPlayerStandingMapY]
+ ld a, [wPlayerNextMapY]
sub 4
ld d, a
- ld a, [wPlayerStandingMapX]
+ ld a, [wPlayerNextMapX]
sub 4
ld e, a
ld a, [wCurrMapWarpCount]
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 70cba50..cc82ef3 100644
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -334,26 +334,34 @@ Function17cb::
call Bankswitch
ret
-Function17de::
+; sets carry flag if the sprite data includes "in-motion" sprites
+IsAnimatedSprite:: ; 00:17de
push hl
push bc
ld c, a
- ld b, $ff
- ld hl, .Data
-.asm_17e6: ; 00:17e6
+ ld b, -1
+ ld hl, .NonAnimatedSprites
+.loop
ld a, [hli]
cp b
- jr z, .asm_17ee
+ jr z, .done
cp c
- jr nz, .asm_17e6
+ jr nz, .loop
scf
-.asm_17ee: ; 00:17ee
+.done
pop bc
pop hl
ret
-.Data: ; 00:17f1
- db $51, $55, $56, $57, $58, $5a, $5b, $ff
+.NonAnimatedSprites: ; 00:17f1
+ db SPRITE_KABIGON
+ db SPRITE_POKE_BALL
+ db SPRITE_POKEDEX
+ db SPRITE_PAPER
+ db SPRITE_OLD_LINK_RECEPTIONIST
+ db SPRITE_EGG
+ db SPRITE_BOULDER
+ db -1
Function17f9::
call GetMapObject
diff --git a/home/tileset.asm b/home/tileset.asm
index aabf249..4929159 100644
--- a/home/tileset.asm
+++ b/home/tileset.asm
@@ -50,7 +50,7 @@ RefreshPlayerCoords:: ; 2d74
ld a, [wXCoord]
add a, 4
ld d, a
- ld hl, wPlayerStandingMapX
+ ld hl, wPlayerNextMapX
sub [hl]
ld [hl], d
ld hl, wPlayerObjectXCoord
@@ -61,7 +61,7 @@ RefreshPlayerCoords:: ; 2d74
ld a, [wYCoord]
add a, 4
ld e, a
- ld hl, wPlayerStandingMapY
+ ld hl, wPlayerNextMapY
sub [hl]
ld [hl], e
ld hl, wPlayerObjectYCoord
@@ -211,18 +211,18 @@ SaveScreen:: ; 2df1
RefreshTiles:: ; 2e52
call .left_right
call .up_down
- ld a, [wPlayerStandingMapX]
+ ld a, [wPlayerNextMapX]
ld d, a
- ld a, [wPlayerStandingMapY]
+ ld a, [wPlayerNextMapY]
ld e, a
call GetCoordTile
ld [wPlayerStandingTile], a
ret
.up_down ; 2e67
- ld a, [wPlayerStandingMapX]
+ ld a, [wPlayerNextMapX]
ld d, a
- ld a, [wPlayerStandingMapY]
+ ld a, [wPlayerNextMapY]
ld e, a
push de
inc e
@@ -235,9 +235,9 @@ RefreshTiles:: ; 2e52
ret
.left_right ; 2e80
- ld a, [wPlayerStandingMapX]
+ ld a, [wPlayerNextMapX]
ld d, a
- ld a, [wPlayerStandingMapY]
+ ld a, [wPlayerNextMapY]
ld e, a
push de
dec d
@@ -270,10 +270,10 @@ GetFacingTileCoord:: ; 2e99
ld h, [hl]
ld l, a
- ld a, [wPlayerStandingMapX]
+ ld a, [wPlayerNextMapX]
add a, d
ld d, a
- ld a, [wPlayerStandingMapY]
+ ld a, [wPlayerNextMapY]
add a, e
ld e, a
ld a, [hl]