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.asm14
1 files changed, 8 insertions, 6 deletions
diff --git a/home/map_objects.asm b/home/map_objects.asm
index 70cba50..ca7ca0b 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,27 @@ Function17cb::
call Bankswitch
ret
-Function17de::
+CheckNonTurningSprite:: ; 00:17de
+ ; sets carry flag if a is equal to any of the sprites below
push hl
push bc
ld c, a
ld b, $ff
ld hl, .Data
-.asm_17e6: ; 00:17e6
+.loop: ; 00:17e6
ld a, [hli]
cp b
- jr z, .asm_17ee
+ jr z, .escape ; if a == $FF, escape
cp c
- jr nz, .asm_17e6
+ jr nz, .loop ; if a != c, loop
scf
-.asm_17ee: ; 00:17ee
+.escape: ; 00:17ee
pop bc
pop hl
ret
.Data: ; 00:17f1
- db $51, $55, $56, $57, $58, $5a, $5b, $ff
+ db SPRITE_KABIGON, SPRITE_POKE_BALL, SPRITE_POKEDEX, SPRITE_PAPER, SPRITE_OLD_LINK_RECEPTIONIST, SPRITE_EGG, SPRITE_BOULDER, $ff
Function17f9::
call GetMapObject