From 4b230a57a994c826880014e887ca0be3c98ee2f5 Mon Sep 17 00:00:00 2001 From: Tom Ball Date: Mon, 22 Jan 2024 11:35:30 -0800 Subject: [PATCH] some compiler errors --- libs/core/pxt.h | 1 - libs/screen/image.cpp | 12 ++++++------ libs/st7735/pxt.json | 3 ++- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/libs/core/pxt.h b/libs/core/pxt.h index cb1363c27fc..5021579d9c1 100644 --- a/libs/core/pxt.h +++ b/libs/core/pxt.h @@ -42,7 +42,6 @@ static inline ImageData *imageBytes(ImageLiteral_ lit) { typedef MicroBitPin DevicePin; typedef RefMImage *Image; -typedef RefImage *SImage; extern MicroBit uBit; extern MicroBitEvent lastEvent; diff --git a/libs/screen/image.cpp b/libs/screen/image.cpp index fbe9a70759a..29dc185ba21 100644 --- a/libs/screen/image.cpp +++ b/libs/screen/image.cpp @@ -1313,16 +1313,16 @@ void drawVLine(SImage_ img, int x, int y, int h, int c) { void fillTriangle(SImage_ img, int x0, int y0, int x1, int y1, int x2, int y2, int c) { if (x1 < x0) { - swap(x0, x1); - swap(y0, y1); + pxt::swap(x0, x1); + pxt::swap(y0, y1); } if (x2 < x1) { - swap(x1, x2); - swap(y1, y2); + pxt::swap(x1, x2); + pxt::swap(y1, y2); } if (x1 < x0) { - swap(x0, x1); - swap(y0, y1); + pxt::swap(x0, x1); + pxt::swap(y0, y1); } LineGenState lines[] = { diff --git a/libs/st7735/pxt.json b/libs/st7735/pxt.json index 150db04db2f..a21fc5809a9 100644 --- a/libs/st7735/pxt.json +++ b/libs/st7735/pxt.json @@ -19,7 +19,8 @@ "font12.jres", "arcadegamepad.h", "indexedscreen.h", - "arcadesound.h" + "arcadesound.h", + "jddisplay.cpp" ], "dependencies": { "core": "file:../core"