![]() |
Routines |
| Prev: C6B6 | Up: Map | Next: C6EA |
|
Used by the routine at ENTER_ROOM.
Sets the room's bit in ROOMS_SEEN: byte room/8, bit 7 minus room mod 8, so room 0 is bit 7 of the first byte. The 31 bytes have room for 248 rooms. PERCENTAGE counts them.
|
||||||||
| MARK_ROOM_SEEN | C6CC | LD A,(IX+$08) | E = the byte: the room number divided by 8 | |||||
| C6CF | RRA | |||||||
| C6D0 | RRA | |||||||
| C6D1 | RRA | |||||||
| C6D2 | AND $1F | |||||||
| C6D4 | LD E,A | |||||||
| C6D5 | LD A,(IX+$08) | A = the bit: a carry rotated in from the top, as far as the room number's low three bits say | ||||||
| C6D8 | AND $07 | |||||||
| C6DA | LD B,A | |||||||
| C6DB | INC B | |||||||
| C6DC | XOR A | |||||||
| C6DD | SCF | |||||||
| MARK_ROOM_SEEN_0 | C6DE | RRA | ||||||
| C6DF | DJNZ MARK_ROOM_SEEN_0 | |||||||
| C6E1 | LD D,$00 | Set it in the map | ||||||
| C6E3 | LD HL,ROOMS_SEEN | |||||||
| C6E6 | ADD HL,DE | |||||||
| C6E7 | OR (HL) | |||||||
| C6E8 | LD (HL),A | |||||||
| C6E9 | RET | |||||||
| Prev: C6B6 | Up: Map | Next: C6EA |