Bring the tutorials back in line with the fixed interpreter
Eleven of the thirteen defects these two games found are fixed, and the chapters that taught around them said things that are no longer true. Chapter 17: the drawing verbs are no longer invisible, they are covered by a text layer that `WINDOW` can now shrink; the cell size is `RGR(3)` and the grid is `RWINDOW`, not a hand-measured constant; a character written past a short row's end lands. Chapter 18: traps 3 and 4 -- the skipped block that broke its caller's `RETURN`, and `SSHAPE` ignoring a subscript -- become history rather than warnings, and Step 3 no longer claims a sprite is the *only* way to put a picture up, only the one that costs nothing. **Neither `.bas` listing changes, and both READMEs now say why.** The character game still writes `CW# = 16` and the artwork game still keeps six brick stamps in six scalars. What those listings are worth is being what a program written against those constraints looks like, with comments explaining what each one was avoiding -- rewriting them to pretend the problems never existed would throw that away. So Chapter 17 Step 2 shows the `RGR(3)`/`RWINDOW` form and says plainly that the listing beside it does not use it. That is the one place in either chapter where a quoted fragment is not verbatim from the game. Also: the closing pointers now say which entries are struck and which stand, and the budgets table in Chapter 18 notes that several of those budgets were tighter when the game was written. TODO.md section 9 item 3 is updated rather than struck: the `WINDOW` half is fixed, the default text area owning the whole window is not, and whether that default is right is a question rather than a defect. Verified against the fixed interpreter: both games run 45 seconds on the SDL frontend with no error line and the score climbing; both suites are green in both configurations; `docs_examples` passes and `docs_screenshots --check` re-renders all thirteen figures byte-identically; coverage is 95.0% of lines against the 90 gate, with src/variable.c at 100%; and every other quoted fragment still appears verbatim in the listing it came from. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
17
TODO.md
17
TODO.md
@@ -2629,8 +2629,21 @@ reduced against `build/basic`, the stdio build, unless it says otherwise.
|
||||
`tests/structure_verbs.c`, which today only exercises blocks whose bodies are plain
|
||||
statements.
|
||||
|
||||
3. **In the standalone SDL build, nothing the graphics verbs draw can ever be seen.** Not
|
||||
"does not persist" — *never visible at all*, in any frame.
|
||||
3. **In the standalone SDL build, nothing the graphics verbs draw can be seen unless the
|
||||
program shrinks the text area first.** **Half done.** The tee sink now forwards
|
||||
`WINDOW` (§6 item 31), so `sink_window()` is reachable and a program *can* take rows
|
||||
back from the text layer -- which is the half that made this unanswerable. What stands
|
||||
is the default: the text area is the whole window, so a program that does not call
|
||||
`WINDOW` still cannot see a drawing.
|
||||
|
||||
Whether that default is right is a real question rather than a defect, and it is
|
||||
entangled with what no `WINDOW` call fixes -- the frontend never clears and SDL
|
||||
double-buffers, so a drawing has to be re-issued every frame, and it has to fit inside
|
||||
one batch to survive a capture (item 5). Both are now documented in chapters 6, 13 and
|
||||
14. **Sprites remain the only thing visible for free**, so the trick the game uses is
|
||||
still the right one for a game; it should not be the *only* way, and it no longer is.
|
||||
|
||||
The original report, whose second bullet is fixed and whose first stands:
|
||||
|
||||
```basic
|
||||
GRAPHIC 1, 1
|
||||
|
||||
Reference in New Issue
Block a user