![]() |
Routines |
| Prev: 38465 | Up: Map | Next: 38601 |
|
Used by the routine at EnterRoom.
|
||||||||
|
Create an offset in BC.
|
||||||||
| VisitRoom | 38575 | LD C,A | C=A. | |||||
| 38576 | SRL C | Divide by 8. | ||||||
| 38578 | SRL C | |||||||
| 38580 | SRL C | |||||||
| 38582 | LD B,0 | B=0. | ||||||
| 38584 | LD HL,24128 | HL=VisitedRooms + BC. | ||||||
| 38587 | ADD HL,BC | |||||||
| 38588 | RLCA | Multiply by 8. | ||||||
| 38589 | RLCA | |||||||
| 38590 | RLCA | |||||||
| 38591 | AND %00111000 | Keep only bits 3-5. | ||||||
| 38593 | OR %11000110 | Set bits 1-2, 6-7. | ||||||
| 38595 | LD (38599),A | Write this value to 38599 which updates the bit to set. | ||||||
| 38598 | SET 0,(HL) | With above, set the bit to mark the room as having been visited. | ||||||
| 38600 | RET | Return. | ||||||
|
View the equivalent code in;
|
||||||||
| Prev: 38465 | Up: Map | Next: 38601 |