![]() |
Routines |
| Prev: CA17 | Up: Map | Next: CA32 |
|
Used by the routines at chk_facing_N, chk_facing_E, chk_facing_S, chk_facing_W and dispatch_on_facing.
Builds the facing code from the two bits that store it: bit 6 of +$07 (the sprite is mirrored) becomes bit 1, and bit 3 of the type (front view) becomes bit 0. So 0 is W, 1 E, 2 N and 3 S.
|
||||||||||
| get_sprite_dir | CA1E | LD A,(IX+$07) | mirror bit to bit 4 | |||||||
| CA21 | RRCA | |||||||||
| CA22 | RRCA | |||||||||
| CA23 | AND $10 | |||||||||
| CA25 | LD L,A | |||||||||
| CA26 | LD A,(IX+$00) | with type bit 3 | ||||||||
| CA29 | AND $08 | |||||||||
| CA2B | OR L | down to bits 1 and 0 | ||||||||
| CA2C | RRCA | |||||||||
| CA2D | RRCA | |||||||||
| CA2E | RRCA | |||||||||
| CA2F | AND $03 | |||||||||
| CA31 | RET | |||||||||
| Prev: CA17 | Up: Map | Next: CA32 |