Prev: 7617 Up: Map Next: 763A
7623: Fetch Sprite
Used by the routine at PrepareOldSprite.
Looks up the address of a sprite graphic in the table at SpritesTable. This entry point uses the sprite ID which was last recorded by StoreEntity.
Output
DE The sprite memory address
FetchSprite 7623 LD A,($5F16) Fetch the sprite ID of the recorded sprite (OldSprite_ID).
GetSprite 7626 DEC A Decrease the sprite ID by one, as the table starts at ID 01.
7627 RLCA Multiply by 2 as the table contains addresses.
7628 AND %01111110 Keep only bits 1-6.
762A LD HL,$7702 Point HL at the sprite table (SpritesTable).
762D LD C,A Calculate the lookup address (HL + offset).
762E LD B,$00
7630 ADD HL,BC
7631 LD E,(HL) DE=fetch sprite address pointed to by HL.
7632 INC HL
7633 LD D,(HL)
7634 RET Return.
This entry point is used by the routine at PrepareActorSprite.
Fetch the sprite for the actor, rather than the recorded sprite.
FetchActorSprite 7635 LD A,(IX+$00) Load the sprite ID from the currently active actor.
7638 JR GetSprite Jump to GetSprite.
View the equivalent code in;
Prev: 7617 Up: Map Next: 763A