![]() |
Routines |
| Prev: 853D | Up: Map | Next: 857F |
|
Looks up the sprite pointer for the ID in 5E54. SpritesTable is the default table. On an odd level MapSpriteBand may switch the index and table to Sprite_Band_Table. Nothing calls this routine; the game uses FetchActorSprite instead.
|
||||||||
| FetchSprite | 8568 | LD BC,$BAC0 | Point the sprite table at SpritesTable. | |||||
| 856B | LD A,($5EA2) | Test LevelParity. | ||||||
| 856E | AND A | |||||||
| 856F | LD A,($5E54) | Fetch the sprite ID from 5E54. | ||||||
| 8572 | CALL NZ,MapSpriteBand | Call MapSpriteBand if this is an odd level. | ||||||
|
Index the sprite table and return the address.
|
||||||||
| FetchSprite_Loop | 8575 | DEC A | Fetch the sprite address for index A-01. | |||||
| 8576 | LD L,A | |||||||
| 8577 | LD H,$00 | |||||||
| 8579 | ADD HL,HL | |||||||
| 857A | ADD HL,BC | |||||||
| 857B | LD E,(HL) | |||||||
| 857C | INC HL | |||||||
| 857D | LD D,(HL) | |||||||
| 857E | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 853D | Up: Map | Next: 857F |