![]() |
Routines |
| Prev: 9E86 | Up: Map | Next: 9E96 |
|
Used by the routines at HandlerPlayerAppearing, HandlerPlayerVanishing, LoseLife and FetchActorSprite.
Looks up the address of the graphic for a sprite in the table at SpritesTable. The table has a two byte entry for each sprite ID, starting at ID 01.
|
||||||||||||
| FetchSprite | 9E89 | DEC A | Decrease the sprite ID by one, as the table starts at ID 01. | |||||||||
| 9E8A | LD L,A | Fetch the sprite ID. | ||||||||||
| 9E8B | LD H,$00 | |||||||||||
| 9E8D | ADD HL,HL | Multiply by 02 as each entry in the table is a two byte address. | ||||||||||
| 9E8E | LD BC,$A4BE | HL=SpritesTable + the offset of the entry. | ||||||||||
| 9E91 | ADD HL,BC | |||||||||||
| 9E92 | LD E,(HL) | Fetch the sprite address. | ||||||||||
| 9E93 | INC HL | |||||||||||
| 9E94 | LD D,(HL) | |||||||||||
| 9E95 | RET | Return. | ||||||||||
|
View the equivalent code in;
|
||||||||||||
| Prev: 9E86 | Up: Map | Next: 9E96 |