From 6880246ccaf4f79d4e6706a861c7b475cee8ba6d Mon Sep 17 00:00:00 2001 From: Christian Colglazier Date: Fri, 28 May 2021 13:41:22 -0400 Subject: [PATCH] Fixed VCO title graphic --- src/droplets/vco_droplet.cpp | 2 +- src/graphics/sprite.cpp | 8 ++++---- src/graphics/sprite.h | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/droplets/vco_droplet.cpp b/src/droplets/vco_droplet.cpp index 01b4d2d..1462d7f 100644 --- a/src/droplets/vco_droplet.cpp +++ b/src/droplets/vco_droplet.cpp @@ -93,7 +93,7 @@ void VCODroplet::Draw() { Font_6x8, WaveToString(wave)); } - wave_graphic->DrawTile(*Patch(), + wave_graphic->DrawTile(Patch(), GetScreenMin(), 0, GetScreenMax(), diff --git a/src/graphics/sprite.cpp b/src/graphics/sprite.cpp index 0731a91..542c6fd 100644 --- a/src/graphics/sprite.cpp +++ b/src/graphics/sprite.cpp @@ -59,17 +59,17 @@ int Sprite::GetWidth() { } -void Sprite::Draw(DaisyPatch patch, int x, int y) { +void Sprite::Draw(DaisyPatch* patch, int x, int y) { for (int w = 0; w < width; w++) { for (int h = 0; h < height; h++) { - patch.display.DrawPixel(x+w, y+h, + patch->display.DrawPixel(x+w, y+h, sprite[GetShiftArrayX(w)] [GetShiftArrayY(height-h)]); } } } -void Sprite::DrawTile(DaisyPatch patch, +void Sprite::DrawTile(DaisyPatch* patch, int x1, int y1, int x2, @@ -83,7 +83,7 @@ void Sprite::DrawTile(DaisyPatch patch, for (int h = y_min; h < y_max; h++) { x = GetShiftArrayX((w-x_min) % width); y = GetShiftArrayY((h-y_min) % height); - patch.display.DrawPixel(w, h, sprite[x][y]); + patch->display.DrawPixel(w, h, sprite[x][y]); } } } diff --git a/src/graphics/sprite.h b/src/graphics/sprite.h index 16b43ee..5076319 100644 --- a/src/graphics/sprite.h +++ b/src/graphics/sprite.h @@ -110,7 +110,7 @@ class Sprite { * @param x starting x coordinate of sprite * @param y starting y coordinate of sprite */ - void Draw(DaisyPatch patch, + void Draw(DaisyPatch* patch, int x, int y); @@ -124,7 +124,7 @@ class Sprite { * @param x2 x coordinate of the second point * @param y2 y coordinate of the second point */ - void DrawTile(DaisyPatch patch, + void DrawTile(DaisyPatch* patch, int x1, int y1, int x2,