Skip to content

Commit

Permalink
Merge pull request #623 from StijnRuts/patch-3
Browse files Browse the repository at this point in the history
Fix drawSpace function
  • Loading branch information
aduros authored Mar 9, 2023
2 parents b8e1b28 + 7b0aaa8 commit b3d390f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions site/docs/guides/text.md
Original file line number Diff line number Diff line change
Expand Up @@ -221,13 +221,13 @@ const font = memory.data<u8>([
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<u16>(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<u16>(w4.DRAW_COLORS, colors);
}
Expand Down

0 comments on commit b3d390f

Please sign in to comment.