summaryrefslogtreecommitdiff
path: root/home/map_objects.asm
diff options
context:
space:
mode:
Diffstat (limited to 'home/map_objects.asm')
-rw-r--r--home/map_objects.asm30
1 files changed, 20 insertions, 10 deletions
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 70cba50..c473e13 100644
--- a/home/map_objects.asm
+++ b/home/map_objects.asm
@@ -315,6 +315,7 @@ UpdateSprites:: ; 00:17a8
ret
GetObjectStruct:: ; 00:17bf
+; Puts the start of the a'th object struct into bc
ld bc, $28
ld hl, wObjectStructs
call AddNTimes
@@ -334,26 +335,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
@@ -661,7 +670,8 @@ Function19b5::
res 7, [hl]
ret
-Function19c0::
+SetObjectFacing:: ; 19C0
+ ; a is NPC number, d is direction
push de
call CheckObjectVisibility
pop de