~colbyhub/pocket_dust

53ee1e2c1793723d54aed124d9d7fed763ce5808 — colbyhub 1 year, 4 months ago af0f572
Add accurate cursor colors

Implements: https://todo.sr.ht/~colbyhub/pocket_dust-issues/26
1 files changed, 2 insertions(+), 2 deletions(-)

M src/main.c
M src/main.c => src/main.c +2 -2
@@ 33,6 33,7 @@ typedef struct v2 {
} v2;

bool paused = false;
const unsigned char cursor_colors[] = {1,2,3,3,0,3,2,0,0,0,0,0,0,0,0,0};

typedef uint16_t particle_t;



@@ 156,7 157,6 @@ particle_t* update_torch(uint8_t x, uint8_t y) {
    }
  }


  return particle;
}



@@ 595,7 595,7 @@ void update(void) {
  }
  
  // Draw cursor
  *DRAW_COLORS = primary_material_id + 1;
  *DRAW_COLORS = cursor_colors[primary_material_id - 1] + 1;
  rect(1 + *MOUSE_X + (pen_size / 2) - pen_size, 1 + *MOUSE_Y + (pen_size / 2) - pen_size, pen_size, pen_size);

  // Draw menu sprite