| Ant Attack | Routines |
| Prev: 812F | Up: Map | Next: 814A |
|
The 512 places in PLANES are 32 to a row, and each row is two half-rows of 16. The first half-row's places are every other byte across one row of the buffer; the second's are one byte across and four rows down. Each row of places is eight rows of the buffer. So the places tile the view like bricks, 16 pixels wide. Measured by running this for a range of places.
|
||||||||
| PLANE_TO_BUFFER | 8130 | LD A,L | ||||||
| 8131 | RLA | |||||||
| 8132 | RL H | |||||||
| 8134 | RLA | |||||||
| 8135 | RL H | |||||||
| 8137 | RLA | |||||||
| 8138 | RL H | |||||||
| 813A | RLCA | |||||||
| 813B | RL L | |||||||
| 813D | RL L | |||||||
| 813F | RRA | |||||||
| 8140 | LD A,L | |||||||
| 8141 | RRA | |||||||
| 8142 | AND $9F | |||||||
| 8144 | LD L,A | |||||||
| 8145 | LD A,H | |||||||
| 8146 | SUB $08 | |||||||
| 8148 | LD H,A | |||||||
| 8149 | RET | |||||||
| Prev: 812F | Up: Map | Next: 814A |