![]() |
Routines |
| Prev: 30231 | Up: Map | Next: 30266 |
|
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.
|
||||||||
| FetchSprite | 30243 | LD A,(24342) | Fetch the sprite ID of the recorded sprite (OldSprite_ID). | |||||
| GetSprite | 30246 | DEC A | Decrease the sprite ID by one, as the table starts at ID 1. | |||||
| 30247 | RLCA | Multiply by 2 as the table contains addresses. | ||||||
| 30248 | AND %01111110 | Keep only bits 1-6. | ||||||
| 30250 | LD HL,30466 | Point HL at the sprite table (SpritesTable). | ||||||
| 30253 | LD C,A | Calculate the lookup address (HL + offset). | ||||||
| 30254 | LD B,0 | |||||||
| 30256 | ADD HL,BC | |||||||
| 30257 | LD E,(HL) | DE=fetch sprite address pointed to by HL. | ||||||
| 30258 | INC HL | |||||||
| 30259 | LD D,(HL) | |||||||
| 30260 | RET | Return. | ||||||
|
This entry point is used by the routine at PrepareActorSprite.
Fetch the sprite for the actor, rather than the recorded sprite.
|
||||||||
| FetchActorSprite | 30261 | LD A,(IX+0) | Load the sprite ID from the currently active actor. | |||||
| 30264 | JR GetSprite | Jump to GetSprite. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 30231 | Up: Map | Next: 30266 |