WIP: restore lost C behaviors (schtick message, forced redraw, greeting)
Incomplete checkpoint, preserved after the implementing session hit a capacity limit partway through mutation verification. NOT reviewed and NOT gate-clean: make fmt has not been run, so fmt-check currently fails on ARCHITECTURE.md and TODO.md. Work still outstanding before this is fit for review: - run make fmt and fold the result in - finish mutation-proving each of the three behaviors - verify every message string byte-for-byte against the C sources - confirm TestSeedCompatItemTables passes with its golden untouched Refs #13.
This commit is contained in:
@@ -78,6 +78,16 @@ func (t *Tcell) Render(w *game.Window) {
|
||||
t.screen.Show()
|
||||
}
|
||||
|
||||
// Repaint redraws the whole physical screen from tcell's content buffer
|
||||
// — which holds what Render last blitted, so this is C's clearok(curscr,
|
||||
// TRUE) + wrefresh(curscr) (command.c, the CTRL('R') arm) rather than a
|
||||
// fresh draw of stdscr. Sync throws away tcell's record of what the
|
||||
// terminal is showing, so unlike Show it repaints cells it believes are
|
||||
// already correct, which is what makes it fix a corrupted screen.
|
||||
func (t *Tcell) Repaint() {
|
||||
t.screen.Sync()
|
||||
}
|
||||
|
||||
// ReadChar blocks for the next key, translated to the byte codes the C
|
||||
// game reads: arrows become hjkl, control keys their C0 codes. ok is
|
||||
// false when Interrupt woke the read instead of a key arriving.
|
||||
|
||||
Reference in New Issue
Block a user