![]() |
Routines |
| Prev: C58D | Up: Map | Next: C5D3 |
|
The facing, 0 to 3, from the two bits that store it: bit 6 of the flags (mirrored) clear gives 2, and bit 2 of the graphic adds 1. So 0 faces lower U, 1 higher U, 2 higher V and 3 lower V (see HANDLE_LEFT_RIGHT). Knight Lore's is the same with bit 3 of the type in place of bit 2.
|
||||||||||||
| GET_SPRITE_DIR | C5BD | LD A,(IX+$07) | L = 8 if the sprite is not mirrored | |||||||||
| C5C0 | RRCA | |||||||||||
| C5C1 | RRCA | |||||||||||
| C5C2 | RRCA | |||||||||||
| C5C3 | AND $08 | |||||||||||
| C5C5 | XOR $08 | |||||||||||
| C5C7 | LD L,A | |||||||||||
| C5C8 | LD A,(IX+$00) | With the graphic's bit 2 | ||||||||||
| C5CB | AND $04 | |||||||||||
| C5CD | OR L | |||||||||||
| C5CE | RRCA | Down to bits 1 and 0 | ||||||||||
| C5CF | RRCA | |||||||||||
| C5D0 | AND $03 | |||||||||||
| C5D2 | RET | |||||||||||
| Prev: C58D | Up: Map | Next: C5D3 |