![]() |
Routines |
| Prev: D6C9 | Up: Map | Next: D704 |
|
Used by the routines at calc_2d_info and print_sprite.
Byte 0 of the record indexes sprite_tbl for the sprite. A sprite whose first header byte is 0 is not drawn: the routine then throws away its own return address, so its RET leaves its caller too. Otherwise vflip_sprite_data turns the stored data to match the object's flip bits and returns here with DE still on the header.
|
||||||||||
| flip_sprite | D6EF | LD L,(IX+$00) | DE = the sprite, from sprite_tbl | |||||||
| D6F2 | LD H,$00 | |||||||||
| D6F4 | ADD HL,HL | |||||||||
| D6F5 | LD BC,sprite_tbl | |||||||||
| D6F8 | ADD HL,BC | |||||||||
| D6F9 | LD E,(HL) | |||||||||
| D6FA | INC HL | |||||||||
| D6FB | LD D,(HL) | |||||||||
| D6FC | LD A,(DE) | a real sprite: see that it faces the right way | ||||||||
| D6FD | AND A | |||||||||
| D6FE | JP NZ,vflip_sprite_data | |||||||||
| D701 | INC SP | no sprite: return from the caller as well | ||||||||
| D702 | INC SP | |||||||||
| D703 | RET | |||||||||
| Prev: D6C9 | Up: Map | Next: D704 |