Prev: 29001 Up: Map Next: 29032
29013: Fetch Sprite
Used by the routine at PrepareOldSprite.
Finds the sprite for the sprite ID in the actor buffer (Actor_SpriteID), or when entering at GetSprite the sprite for the sprite ID in A. The sprite data starts with the height in lines. Each line is two bytes.
Output
DE Sprite
FetchSprite 29013 LD A,(24098) Fetch the sprite ID from the actor buffer (Actor_SpriteID).
This entry point is used by the routine at FetchActorSprite.
GetSprite 29016 DEC A Work out the offset into the table of sprites.
29017 SLA A
29019 AND %01111110 Keep only bits 1-6.
29021 LD HL,32518 HL=SpritesTable.
29024 LD C,A Create an offset in BC.
29025 LD B,0
29027 ADD HL,BC HL=SpritesTable + offset.
29028 LD E,(HL) DE=fetch sprite address pointed to by HL.
29029 INC HL
29030 LD D,(HL)
29031 RET Return.
View the equivalent code in;
Prev: 29001 Up: Map Next: 29032