Skip to content

Commit

Permalink
Screen function reordering
Browse files Browse the repository at this point in the history
  • Loading branch information
Deseteral committed Oct 12, 2023
1 parent 1be0c34 commit 60b0699
Showing 1 changed file with 12 additions and 12 deletions.
24 changes: 12 additions & 12 deletions src/gfx/screen.ts
Original file line number Diff line number Diff line change
Expand Up @@ -73,31 +73,31 @@ export class Screen {
*/

/**
* Makes pixel at given position transparent.
* Draws single pixel at given position in active color.
*/
public clearPixelV(position: Vector2): void {
this.clearPixel(position.x, position.y);
public drawPixelV(position: Vector2): void {
this.drawPixel(position.x, position.y);
}

/**
* Makes pixel at given position transparent.
* Draws single pixel at given position in active color.
*/
public clearPixel(x: number, y: number): void {
this.clearRect((x | 0), (y | 0), 1, 1);
public drawPixel(x: number, y: number): void {
this.drawRect((x | 0), (y | 0), 1, 1);
}

/**
* Draws single pixel at given position in active color.
* Makes pixel at given position transparent.
*/
public drawPixelV(position: Vector2): void {
this.drawPixel(position.x, position.y);
public clearPixelV(position: Vector2): void {
this.clearPixel(position.x, position.y);
}

/**
* Draws single pixel at given position in active color.
* Makes pixel at given position transparent.
*/
public drawPixel(x: number, y: number): void {
this.drawRect((x | 0), (y | 0), 1, 1);
public clearPixel(x: number, y: number): void {
this.clearRect((x | 0), (y | 0), 1, 1);
}

/*
Expand Down

0 comments on commit 60b0699

Please sign in to comment.