Skip to content

Commit

Permalink
Merge pull request #622 from StijnRuts/patch-2
Browse files Browse the repository at this point in the history
Fix incorrect variable name in pixel function
  • Loading branch information
aduros authored Mar 9, 2023
2 parents a091a2e + 3699d29 commit b8e1b28
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions site/docs/guides/basic-drawing.md
Original file line number Diff line number Diff line change
Expand Up @@ -345,7 +345,7 @@ function pixel (x: i32, y: i32): void {

// Use the first DRAW_COLOR as the pixel color.
const palette_color = u8(load<u16>(w4.DRAW_COLORS) & 0b1111);
if (color == 0) {
if (palette_color == 0) {
// Transparent
return;
}
Expand All @@ -367,7 +367,7 @@ void pixel (int x, int y) {

// Use the first DRAW_COLOR as the pixel color
int palette_color = *DRAW_COLORS & 0b1111;
if (color == 0) {
if (palette_color == 0) {
// Transparent
return;
}
Expand All @@ -390,7 +390,7 @@ fn void pixel(int x, int y)
// Use the first DRAW_COLOR as the pixel color
int palette_color = *w4::DRAW_COLORS & 0b1111;
if (color == 0)
if (palette_color == 0)
{
// Transparent
return;
Expand Down

0 comments on commit b8e1b28

Please sign in to comment.