![]() |
Routines |
| Prev: D562 | Up: Map | Next: D5B1 |
|
Used by the routines at Apply_Wave_Border_Colour and RenderHUD.
Draws the rectangular border surrounding the play area. If the units digit of *WaveNumber is 09 the routine returns without drawing. Otherwise it draws full-width horizontal strips at rows 0E and 0F (top edge) via DrawPlayfieldBorderRow, then for each row from 10 to B7 it OR-blits columns 06 07 F8 and F9 (left and right edges), and finally draws full-width strips at rows B8 and B9 (bottom edge) via DrawPlayfieldBorderRow. Called from Erase_Narrow_Entity_Sprite and RenderHUD.
|
|||||
|
|||||
| DrawPlayfieldBorder | D570 | LD A,($C408) | A=*WaveNumber (BCD wave number). | ||
| D573 | AND %00001111 | Keep the low decimal digit (AND 0F). | |||
| D575 | CP $09 | Return if the units digit is 09 (no border drawn). | |||
| D577 | RET Z | ||||
| D578 | LD L,$0E | Call DrawPlayfieldBorderRow to draw the top-edge strip at row 0E. | |||
| D57A | CALL DrawPlayfieldBorderRow | ||||
| D57D | LD L,$0F | Call DrawPlayfieldBorderRow to draw the top-edge strip at row 0F. | |||
| D57F | CALL DrawPlayfieldBorderRow | ||||
| D582 | LD L,$10 | L=10 (top row of the framed block). | |||
|
Left and right edges: for each row 10 to B7 OR-blit columns 06 07 F8 and F9 via PlotCharacterCell_Draw.
|
|||||
| DrawPlayfieldBorder_SideColumns | D584 | LD H,$06 | H=06 (left inner column). | ||
| D586 | PUSH HL | Stash HL on the stack. | |||
| D587 | CALL PlotCharacterCell_Draw | Call PlotCharacterCell_Draw. | |||
| D58A | POP HL | Restore HL from the stack. | |||
| D58B | LD H,$07 | H=07 (left inner column + 01). | |||
| D58D | PUSH HL | Stash HL on the stack. | |||
| D58E | CALL PlotCharacterCell_Draw | Call PlotCharacterCell_Draw. | |||
| D591 | POP HL | Restore HL from the stack. | |||
| D592 | LD H,$F8 | H=F8 (right inner column). | |||
| D594 | PUSH HL | Stash HL on the stack. | |||
| D595 | CALL PlotCharacterCell_Draw | Call PlotCharacterCell_Draw. | |||
| D598 | POP HL | Restore HL from the stack. | |||
| D599 | LD H,$F9 | H=F9 (right inner column + 01). | |||
| D59B | PUSH HL | Stash HL on the stack. | |||
| D59C | CALL PlotCharacterCell_Draw | Call PlotCharacterCell_Draw. | |||
| D59F | POP HL | Restore HL from the stack. | |||
| D5A0 | INC L | Increment L (next row). | |||
| D5A1 | LD A,L | Loop back to DrawPlayfieldBorder_SideColumns until all rows are drawn. | |||
| D5A2 | CP $B8 | ||||
| D5A4 | JR NZ,DrawPlayfieldBorder_SideColumns | ||||
| D5A6 | LD L,$B8 | Call DrawPlayfieldBorderRow to draw the bottom-edge strip at row B8. | |||
| D5A8 | CALL DrawPlayfieldBorderRow | ||||
| D5AB | LD L,$B9 | Call DrawPlayfieldBorderRow to draw the bottom-edge strip at row B9. | |||
| D5AD | CALL DrawPlayfieldBorderRow | ||||
| D5B0 | RET | Return. | |||
| Prev: D562 | Up: Map | Next: D5B1 |