Prev: B925 Up: Map Next: B934
B928: Fetch Sprite
Used by the routine at FetchActorSprite.
Looks up the address of the data of a sprite in the table at SpritesTable.
Input
A The Sprite ID
Output
DE The sprite address
FetchSprite 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