aboutsummaryrefslogtreecommitdiffstats
path: root/src/gdisp/gdisp_pixmap.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gdisp/gdisp_pixmap.c')
-rw-r--r--src/gdisp/gdisp_pixmap.c36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/gdisp/gdisp_pixmap.c b/src/gdisp/gdisp_pixmap.c
index e65e6e71..92075646 100644
--- a/src/gdisp/gdisp_pixmap.c
+++ b/src/gdisp/gdisp_pixmap.c
@@ -122,7 +122,7 @@ LLDSPEC gBool gdisp_lld_init(GDisplay *g) {
g->g.Height = ((gCoord *)((pixmap *)g->priv)->pixels)[1];
g->g.Backlight = 100;
g->g.Contrast = 50;
- g->g.Orientation = GDISP_ROTATE_0;
+ g->g.Orientation = gOrientation0;
g->g.Powermode = gPowerOn;
g->board = 0;
@@ -138,17 +138,17 @@ LLDSPEC void gdisp_lld_draw_pixel(GDisplay *g) {
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
- case GDISP_ROTATE_0:
+ case gOrientation0:
default:
pos = g->p.y * g->g.Width + g->p.x;
break;
- case GDISP_ROTATE_90:
+ case gOrientation90:
pos = (g->g.Width-g->p.x-1) * g->g.Height + g->p.y;
break;
- case GDISP_ROTATE_180:
+ case gOrientation180:
pos = (g->g.Height-g->p.y-1) * g->g.Width + g->g.Width-g->p.x-1;
break;
- case GDISP_ROTATE_270:
+ case gOrientation270:
pos = g->p.x * g->g.Height + g->g.Height-g->p.y-1;
break;
}
@@ -164,17 +164,17 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) {
#if GDISP_NEED_CONTROL
switch(g->g.Orientation) {
- case GDISP_ROTATE_0:
+ case gOrientation0:
default:
pos = g->p.y * g->g.Width + g->p.x;
break;
- case GDISP_ROTATE_90:
+ case gOrientation90:
pos = (g->g.Width-g->p.x-1) * g->g.Height + g->p.y;
break;
- case GDISP_ROTATE_180:
+ case gOrientation180:
pos = (g->g.Height-g->p.y-1) * g->g.Width + g->g.Width-g->p.x-1;
break;
- case GDISP_ROTATE_270:
+ case gOrientation270:
pos = g->p.x * g->g.Height + g->g.Height-g->p.y-1;
break;
}
@@ -189,12 +189,12 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) {
LLDSPEC void gdisp_lld_control(GDisplay *g) {
switch(g->p.x) {
case GDISP_CONTROL_ORIENTATION:
- if (g->g.Orientation == (orientation_t)g->p.ptr)
+ if (g->g.Orientation == (gOrientation)g->p.ptr)
return;
- switch((orientation_t)g->p.ptr) {
- case GDISP_ROTATE_0:
- case GDISP_ROTATE_180:
- if (g->g.Orientation == GDISP_ROTATE_90 || g->g.Orientation == GDISP_ROTATE_270) {
+ switch((gOrientation)g->p.ptr) {
+ case gOrientation0:
+ case gOrientation180:
+ if (g->g.Orientation == gOrientation90 || g->g.Orientation == gOrientation270) {
gCoord tmp;
tmp = g->g.Width;
@@ -202,9 +202,9 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) {
g->g.Height = tmp;
}
break;
- case GDISP_ROTATE_90:
- case GDISP_ROTATE_270:
- if (g->g.Orientation == GDISP_ROTATE_0 || g->g.Orientation == GDISP_ROTATE_180) {
+ case gOrientation90:
+ case gOrientation270:
+ if (g->g.Orientation == gOrientation0 || g->g.Orientation == gOrientation180) {
gCoord tmp;
tmp = g->g.Width;
@@ -215,7 +215,7 @@ LLDSPEC gColor gdisp_lld_get_pixel_color(GDisplay *g) {
default:
return;
}
- g->g.Orientation = (orientation_t)g->p.ptr;
+ g->g.Orientation = (gOrientation)g->p.ptr;
return;
}
}