Prev: 9E55 Up: Map Next: 9E96
9E86: Get Sprite "A"
Used by the routine at PrepDraw23.
Input
A The Sprite ID
Output
DE The sprite address
GetSpriteA 9E86 LD A,($5E15) A=5E15.
This entry point is used by the routines at HandlerFoodItem, HandlerKnight and GetEntitySprite.
GetSpriteAddress 9E89 DEC A Decrease A by one.
9E8A LD L,A Create an offset in HL.
9E8B LD H,$00
9E8D ADD HL,HL HL=HL * 2.
9E8E LD BC,$A4BE HL=SpritesTable + offset.
9E91 ADD HL,BC
9E92 LD E,(HL) DE=the sprite address.
9E93 INC HL
9E94 LD D,(HL)
9E95 RET Return.
Prev: 9E55 Up: Map Next: 9E96