From a36ef5c4951dd14939180091aed90e326510b334 Mon Sep 17 00:00:00 2001 From: Scott Duensing Date: Sun, 7 Jan 2024 18:24:45 -0600 Subject: [PATCH] Renamed text functions to match the rest of the library. Starting math routines. --- examples/cube/cube.c | 3 --- examples/pgztest/pgztest.c | 21 ++++++++----------- f256lib/bitmap.c | 11 +++++----- f256lib/dma.c | 3 --- f256lib/f256.c | 7 +++++++ f256lib/f256.h | 8 ++++++++ f256lib/math.c | 24 ++++++++++++++++++++++ f256lib/math.h | 42 ++++++++++++++++++++++++++++++++++++++ f256lib/text.c | 31 +++++++++++++--------------- f256lib/text.h | 19 +++++++---------- 10 files changed, 116 insertions(+), 53 deletions(-) create mode 100644 f256lib/math.c create mode 100644 f256lib/math.h diff --git a/examples/cube/cube.c b/examples/cube/cube.c index 62c62cd..e3584d2 100644 --- a/examples/cube/cube.c +++ b/examples/cube/cube.c @@ -172,9 +172,6 @@ int main(void) { f256Init(); - resetText(); - bitmapReset(); - while(1) { if (p) { p = 0; diff --git a/examples/pgztest/pgztest.c b/examples/pgztest/pgztest.c index d0b1f7d..29f8673 100644 --- a/examples/pgztest/pgztest.c +++ b/examples/pgztest/pgztest.c @@ -38,8 +38,6 @@ void bitmap(void) { byte l; byte c = 0; - bitmapReset(); - bitmapGetResolution(&mx, &my); for (l=0; l 9) printInt(value / 10); + if (value > 9) textPrintInt(value / 10); c[0] = '0' + (value % 10); c[1] = 0; - print(c); + textPrint(c); } // Reset display to text, "standard" colors. -void resetText(void) { +void textReset(void) { byte mmu = PEEK(MMU_IO_CTRL); // Get current MMU state. byte x; byte y; @@ -209,7 +206,7 @@ void resetText(void) { // Set up default text colors. for (x=0; x