diff options
author | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2018-07-03 13:37:21 -0400 |
---|---|---|
committer | luckytyphlosion <10688458+luckytyphlosion@users.noreply.github.com> | 2018-07-03 13:37:21 -0400 |
commit | 9824a5762008d083ea149af477a3093b89d269a7 (patch) | |
tree | 84359c2f08878986c4b7486f576c8b9280840f7e /home/map_objects.asm | |
parent | 75e4f784924393ccedb27f2831e5a36fe11bada5 (diff) | |
parent | 3fab27f221a8d5400d4b203809ff9b13355d55a3 (diff) |
Merge branch 'master' of https://github.com/pret/pokegold-spaceworld
Diffstat (limited to 'home/map_objects.asm')
-rw-r--r-- | home/map_objects.asm | 30 |
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 |