diff --git a/docs/18-tutorial-breakout-artwork.md b/docs/18-tutorial-breakout-artwork.md index 5802838..9cfc737 100644 --- a/docs/18-tutorial-breakout-artwork.md +++ b/docs/18-tutorial-breakout-artwork.md @@ -531,10 +531,12 @@ with the deadline: ```basic norun LABEL DRAWHUD -GRAPHIC 1, 1 +GRAPHIC 1, 0 WIDTH 1 COLOR 0, 1 : COLOR 1, 4 : COLOR 2, 8 : COLOR 3, 5 COLOR 4, 11 : COLOR 5, 16 : COLOR 6, 6 +Z$ = HBL$ +GSHAPE Z$, 0, 0 BOX 5, 0, 56, 799, 57 IF HN# = 1 THEN DRAW HC#(0), HX1#(0), HY1#(0) TO HX2#(0), HY2#(0) IF HN# < 2 THEN GOTO HUDONE @@ -545,6 +547,16 @@ LABEL HUDONE RETURN ``` +**`GRAPHIC 1, 0` selects the graphics mode without clearing it**, and that is the whole +difference between this routine and the ones that draw the field. Clearing here would take +the field down with the old digits, so the strip is covered by Step 6's `HBL$` eraser at +`0, 0` instead — the drawing stays, so the only way to remove something is to draw over it. +`GRAPHIC 1, 1` is right in a routine that is about to redraw everything anyway. + +**`HUDTEXT` builds the stroke list and `DRAWHUD` replays it**, on different frames. Call +`HUDTEXT` wherever a number in the HUD changes — level setup, a broken brick, a lost life, +a caught gem — and it sets `DHUD# = 1`, which is all it takes to get the strip drawn. + `HX1#()` to `HY2#()` are the stroke endpoints and `HC#()` is the colour source each stroke wants, so one pass over the list draws in as many colours as it likes: labels cyan, the score yellow, the lives green, the level red. **Seven colour sources is the ceiling**, @@ -1793,6 +1805,10 @@ LABEL FILLROW FOR C# = 0 TO 9 BRK#(R# * 10 + C#) = 1 BRN# = BRN# + 1 + SLX# = BRKX# + C# * 72 + SLY# = BRKY# + R# * 24 + SLI# = (R# * 10 + C#) + 1 + SOLID SLI#, SLX#, SLY#, SLX# + 68, SLY# + 16 NEXT C# RETURN