From 7b0aaa88ed2f1adeb59e3e44c2cbcc4a8ccc3455 Mon Sep 17 00:00:00 2001 From: Stijn Ruts Date: Wed, 8 Mar 2023 14:54:26 +0100 Subject: [PATCH] Fix drawSpace function --- site/docs/guides/text.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/site/docs/guides/text.md b/site/docs/guides/text.md index 3bf8d602..6de4ac05 100644 --- a/site/docs/guides/text.md +++ b/site/docs/guides/text.md @@ -221,13 +221,13 @@ const font = memory.data([ 0x38, 0x40, 0x3a, 0x10, 0x48, 0x46, 0x30, 0x66 ]); -function drawSpace(x: i32, y: i32, column: i32, line: i32, colors: u16) { +function drawSpace(x: i32, y: i32, column: i32, line: i32, colors: u16): void { store(w4.DRAW_COLORS, w4.DRAW_COLORS & 0x0F); w4.rect( - x + (column * CHAR_WIDTH), - y + (line * CHAR_HEIGHT), - CHAR_WIDTH, - CHAR_HEIGHT + x + (column * charWidth), + y + (line * charHeight), + charWidth, + charHeight ); store(w4.DRAW_COLORS, colors); }