diff options
author | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
---|---|---|
committer | inmarket <andrewh@inmarket.com.au> | 2018-11-03 10:51:23 +1000 |
commit | 7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d (patch) | |
tree | 95cf152ef65ff19c7b2515b427bbe86b92b611d0 /demos/3rdparty | |
parent | 8bd70d953bcd3e32ceb4e45a4e561c973726280a (diff) | |
download | uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.gz uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.tar.bz2 uGFX-7c5a6c928fa7129cf754c9c73c5c7ae39372ba9d.zip |
For all source files update integer types to the new gI8 etc type names
Diffstat (limited to 'demos/3rdparty')
-rw-r--r-- | demos/3rdparty/bubbles/main.c | 50 | ||||
-rw-r--r-- | demos/3rdparty/notepad-2/main.c | 2 | ||||
-rw-r--r-- | demos/3rdparty/notepad-2/notepadApp.c | 2 | ||||
-rw-r--r-- | demos/3rdparty/notepad-2/notepadCore.c | 18 | ||||
-rw-r--r-- | demos/3rdparty/notepad-2/notepadCore.h | 8 |
5 files changed, 40 insertions, 40 deletions
diff --git a/demos/3rdparty/bubbles/main.c b/demos/3rdparty/bubbles/main.c index 7ab4da2e..16e4177c 100644 --- a/demos/3rdparty/bubbles/main.c +++ b/demos/3rdparty/bubbles/main.c @@ -25,14 +25,14 @@ #define background RGB2COLOR(0,0,0) -uint16_t width, height; -int16_t sine[SCALE+(SCALE/4)]; -int16_t *cosi = &sine[SCALE/4]; /* cos(x) = sin(x+90d)... */ +gU16 width, height; +gI16 sine[SCALE+(SCALE/4)]; +gI16 *cosi = &sine[SCALE/4]; /* cos(x) = sin(x+90d)... */ void initialize (void) { - uint16_t i; + gU16 i; /* if you change the SCALE*1.25 back to SCALE, the program will * occassionally overrun the cosi array -- however this actually @@ -44,12 +44,12 @@ void initialize (void) } -void matrix (int16_t xyz[3][N], gColor col[N]) +void matrix (gI16 xyz[3][N], gColor col[N]) { - static uint32_t t = 0; - int16_t x = -SCALE, y = -SCALE; - uint16_t i, s, d; - uint8_t red,grn,blu; + static gU32 t = 0; + gI16 x = -SCALE, y = -SCALE; + gU16 i, s, d; + gU8 red,grn,blu; #define RED_COLORS (32) #define GREEN_COLORS (64) @@ -81,13 +81,13 @@ void matrix (int16_t xyz[3][N], gColor col[N]) } -void rotate (int16_t xyz[3][N], uint16_t angleX, uint16_t angleY, uint16_t angleZ) +void rotate (gI16 xyz[3][N], gU16 angleX, gU16 angleY, gU16 angleZ) { - uint16_t i; - int16_t tmpX, tmpY; - int16_t sinx = sine[angleX], cosx = cosi[angleX]; - int16_t siny = sine[angleY], cosy = cosi[angleY]; - int16_t sinz = sine[angleZ], cosz = cosi[angleZ]; + gU16 i; + gI16 tmpX, tmpY; + gI16 sinx = sine[angleX], cosx = cosi[angleX]; + gI16 siny = sine[angleY], cosy = cosi[angleY]; + gI16 sinz = sine[angleZ], cosz = cosi[angleZ]; for (i = 0; i < N; i++) { @@ -106,12 +106,12 @@ void rotate (int16_t xyz[3][N], uint16_t angleX, uint16_t angleY, uint16_t angle } -void draw(int16_t xyz[3][N], gColor col[N]) +void draw(gI16 xyz[3][N], gColor col[N]) { - static uint16_t oldProjX[N] = {0}; - static uint16_t oldProjY[N] = {0}; - static uint8_t oldDotSize[N] = {0}; - uint16_t i, projX, projY, projZ, dotSize; + static gU16 oldProjX[N] = {0}; + static gU16 oldProjY[N] = {0}; + static gU8 oldDotSize[N] = {0}; + gU16 i, projX, projY, projZ, dotSize; for (i = 0; i < N; i++) { @@ -138,10 +138,10 @@ void draw(int16_t xyz[3][N], gColor col[N]) /* ---------------------------------------------------------------------- */ -int16_t angleX = 0, angleY = 0, angleZ = 0; -int16_t speedX = 0, speedY = 0, speedZ = 0; +gI16 angleX = 0, angleY = 0, angleZ = 0; +gI16 speedX = 0, speedY = 0, speedZ = 0; -int16_t xyz[3][N]; +gI16 xyz[3][N]; gColor col[N]; @@ -158,8 +158,8 @@ int main (void) gfxSleepMilliseconds (10); gdispClear (background); /* glitches.. */ - width = (uint16_t)gdispGetWidth(); - height = (uint16_t)gdispGetHeight(); + width = (gU16)gdispGetWidth(); + height = (gU16)gdispGetHeight(); initialize(); diff --git a/demos/3rdparty/notepad-2/main.c b/demos/3rdparty/notepad-2/main.c index c61e7d94..f20d1899 100644 --- a/demos/3rdparty/notepad-2/main.c +++ b/demos/3rdparty/notepad-2/main.c @@ -66,7 +66,7 @@ const NColorScheme schemeDefault2 = { .statusBarText = HTML2COLOR(0x000000) }; -const char *tsCalibRead(uint16_t instance) { +const char *tsCalibRead(gU16 instance) { // This will perform a on-spot calibration // Unless you read and add the co-efficients here (void) instance; diff --git a/demos/3rdparty/notepad-2/notepadApp.c b/demos/3rdparty/notepad-2/notepadApp.c index 3b5d2cef..1f94070d 100644 --- a/demos/3rdparty/notepad-2/notepadApp.c +++ b/demos/3rdparty/notepad-2/notepadApp.c @@ -96,7 +96,7 @@ static void nbtnColorBarDraw(GHandle gh, gBool enabled, gBool isdown, const char // Update selection - this is like lazy release. if (k >= 0 && k <= 7) { selPenWidth = k + 1; - ncoreSetPenWidth((uint8_t) selPenWidth); + ncoreSetPenWidth((gU8) selPenWidth); } gdispFillArea(gh->x + NPAD_TOOLBAR_BTN_WIDTH * i, gh->y, diff --git a/demos/3rdparty/notepad-2/notepadCore.c b/demos/3rdparty/notepad-2/notepadCore.c index 73a877a9..4662a9ba 100644 --- a/demos/3rdparty/notepad-2/notepadCore.c +++ b/demos/3rdparty/notepad-2/notepadCore.c @@ -45,8 +45,8 @@ /* This is the drawing core */ static DECLARE_THREAD_STACK(waDrawThread, NCORE_THD_STACK_SIZE); -static uint8_t nPenWidth = 1; -static uint8_t nMode = NCORE_MODE_DRAW; +static gU8 nPenWidth = 1; +static gU8 nMode = NCORE_MODE_DRAW; static gThread nThd; @@ -72,9 +72,9 @@ static void draw_point(gCoord x, gCoord y) { /* Bresenham's Line Drawing Algorithm Modified version to draw line of variable thickness */ static void draw_line(gCoord x0, gCoord y0, gCoord x1, gCoord y1) { - int16_t dy, dx; - int16_t addx, addy; - int16_t P, diff, i; + gI16 dy, dx; + gI16 addx, addy; + gI16 P, diff, i; if (x1 >= x0) { dx = x1 - x0; @@ -223,13 +223,13 @@ void ncoreTerminateDrawThread(void) { /* Get and set the pen width * Brush is cicular, width is pixel radius */ -void ncoreSetPenWidth(uint8_t penWidth) { nPenWidth = penWidth; } -uint8_t ncoreGetPenWidth(void) { return nPenWidth; } +void ncoreSetPenWidth(gU8 penWidth) { nPenWidth = penWidth; } +gU8 ncoreGetPenWidth(void) { return nPenWidth; } /* Get and set the drawing color */ void ncoreSetPenColor(gColor penColor) { gwinSetColor(ncoreDrawingArea, penColor); } gColor ncoreGetPenColor(void) { return ncoreDrawingArea->color; } /* Set mode */ -void ncoreSetMode(uint8_t mode) { nMode = mode; } -uint8_t ncoreGetMode(void) { return nMode; } +void ncoreSetMode(gU8 mode) { nMode = mode; } +gU8 ncoreGetMode(void) { return nMode; } diff --git a/demos/3rdparty/notepad-2/notepadCore.h b/demos/3rdparty/notepad-2/notepadCore.h index e4b78cdc..93fceb7d 100644 --- a/demos/3rdparty/notepad-2/notepadCore.h +++ b/demos/3rdparty/notepad-2/notepadCore.h @@ -54,15 +54,15 @@ void ncoreTerminateDrawThread(void); /* Get and set the pen width * Brush is cicular, width is pixel radius */ -void ncoreSetPenWidth(uint8_t penWidth); -uint8_t ncoreGetPenWidth(void); +void ncoreSetPenWidth(gU8 penWidth); +gU8 ncoreGetPenWidth(void); /* Get and set the drawing color */ void ncoreSetPenColor(gColor penColor); gColor ncoreGetPenColor(void); /* Get and set the pen mode */ -void ncoreSetMode(uint8_t mode); -uint8_t ncoreGetMode(void); +void ncoreSetMode(gU8 mode); +gU8 ncoreGetMode(void); #endif /* NOTEPADCORE_H_ */ |