From f8fc086df30e2bc8ee6cb8892ae4768644a16f81 Mon Sep 17 00:00:00 2001 From: Andrew Kesterson Date: Sun, 2 Aug 2026 13:35:14 -0400 Subject: [PATCH] Stop chapter 18 contradicting itself about FILLROW and DRAWHUD The assembly step still carried the pre-conversion FILLROW, without the SOLID registration Step 8 spends a section teaching -- a reader following the assembly order got a wall the ball passes straight through. DRAWHUD cleared the graphics layer and never stamped the HBL$ eraser Step 6 tells you to make. Both together took the field down every time a digit in the HUD changed. It is GRAPHIC 1, 0 and a GSHAPE of HBL$ at 0, 0, and the difference between that and the routines that draw the field is now stated rather than left to be discovered. Also say where HUDTEXT is called from, which nothing did. Co-Authored-By: Claude Opus 5 (1M context) Claude-Session: https://claude.ai/code/session_01EwxGB6TdoVvZ11KQQME9cL --- docs/18-tutorial-breakout-artwork.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) 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