| Ant Attack | Routines |
| Prev: 8497 | Up: Map | Next: 84C8 |
|
Used by the routine at GAME_FRAME.
A painter's algorithm in eleven steps: gather the map, sort it into PLANES by height, clear the render buffer, work out where each object falls in PLANES, scroll if the player is near the edge, sort the objects by that, turn their places into distances, pick the block picture for this view, paint the lot back to front, and copy it to the screen.
|
||||
| DRAW_VIEW | 84A0 | CALL GATHER_VIEW | The map, into VIEW_CELLS. | |
| 84A3 | CALL BUILD_PLANES | Into PLANES, by height. | ||
| 84A6 | CALL CLEAR_BUFFER_ROWS | Clear the visible rows of the render buffer, a quarter at a time. | ||
| 84A9 | CALL CLEAR_BUFFER_ROWS | |||
| 84AC | CALL CLEAR_BUFFER_ROWS | |||
| 84AF | CALL CLEAR_BUFFER_ROWS | |||
| 84B2 | CALL PROJECT_SPRITES | Where each object falls. | ||
| 84B5 | CALL SCROLL_VIEW | Scroll next frame, if need be. | ||
| 84B8 | CALL SORT_SPRITES | Sort the objects... | ||
| 84BB | CALL SPRITE_DISTANCES | ...and space them out. | ||
| 84BE | CALL SELECT_BLOCK_DRAWER | The block picture for this view. | ||
| 84C1 | CALL DRAW_SCENE | Paint. | ||
| 84C4 | CALL COPY_TO_SCREEN | Show. | ||
| 84C7 | RET | |||
| Prev: 8497 | Up: Map | Next: 84C8 |