| The Hobbit (v1.0) | Routines |
| Prev: 8554 | Up: Map | Next: 858F |
|
Turns the flag nibbles of the action table entry (see 70EA) into separate variables: $B601 (bit 6 of B60E: the action is allowed in the dark), $B5FF (bit 0 of $B60D: the objects need not be within reach), $B5EF (bit 7: the target is a room rather than an object) and $B5F0 (bit 6: the instrument is a room).
|
||||
| 8569 | LD A,($B60E) | A = the action's second set of flags | ||
| 856C | AND $40 | Is it allowed in the dark? | ||
| 856E | LD ($B601),A | |||
| 8571 | LD A,($B60D) | A = the action's main flags | ||
| 8574 | LD B,A | |||
| 8575 | AND $01 | Do the objects need not be within reach? | ||
| 8577 | LD ($B5FF),A | |||
| 857A | LD A,B | |||
| 857B | AND $80 | Is the target actually a room, rather than an object? | ||
| 857D | JR Z,$8581 | |||
| 857F | LD A,$01 | |||
| 8581 | LD ($B5EF),A | |||
| 8584 | LD A,B | Is the instrument actually a room too? | ||
| 8585 | AND $40 | |||
| 8587 | JR Z,$858B | |||
| 8589 | LD A,$01 | |||
| 858B | LD ($B5F0),A | |||
| 858E | RET | |||
| Prev: 8554 | Up: Map | Next: 858F |