Prev: B925 Up: Map Next: B934
B928: Get Sprite Address
Used by the routine at GetEntitySprite.
Input
A The Sprite ID
Output
DE The sprite address
GetSpriteAddress B928 LD L,A Create an offset in HL.
B929 LD H,$00
B92B ADD HL,HL HL=HL * 2.
B92C LD BC,$BF84 HL=SpritesTable + offset.
B92F ADD HL,BC
B930 LD E,(HL) DE=the sprite address.
B931 INC HL
B932 LD D,(HL)
B933 RET Return.
View the equivalent code in;
Prev: B925 Up: Map Next: B934