![]() |
Routines |
| Prev: 39550 | Up: Map | Next: 39578 |
|
Used by the routines at CompletePlanet and StartNewGame.
Applies a mask to every byte of the table at MapTable.
|
||||||||
| MaskMapTable | 39562 | LD BC,290 | Set the number of bytes in BC. | |||||
| 39565 | LD HL,23700 | Use the table. | ||||||
| MaskMapTable_Loop | 39568 | LD A,(HL) | Fetch a byte of the table. | |||||
| 39569 | AND E | Apply the mask. | ||||||
| 39570 | LD (HL),A | Store the byte. | ||||||
| 39571 | INC HL | Move on to the next one. | ||||||
| 39572 | DEC BC | Decrease the counter. | ||||||
| 39573 | LD A,B | Combine B and C. | ||||||
| 39574 | OR C | |||||||
| 39575 | JR NZ,MaskMapTable_Loop | Jump back to MaskMapTable_Loop until the counter is zero. | ||||||
| 39577 | RET | Return. | ||||||
| Prev: 39550 | Up: Map | Next: 39578 |