summaryrefslogtreecommitdiff
path: root/apps/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins')
-rw-r--r--apps/plugins/SOURCES3
-rw-r--r--apps/plugins/SUBDIRS3
-rw-r--r--apps/plugins/bitmaps/native/SOURCES3
-rw-r--r--apps/plugins/imageviewer/jpeg/yuv2rgb.c2
-rw-r--r--apps/plugins/imageviewer/ppm/ppm_decoder.c2
-rw-r--r--apps/plugins/invadrox.c2
-rw-r--r--apps/plugins/lib/bmp_smooth_scale.c2
-rw-r--r--apps/plugins/lib/osd.c8
-rw-r--r--apps/plugins/lib/pluginlib_bmp.c2
-rw-r--r--apps/plugins/lib/xlcd_scroll.c4
-rw-r--r--apps/plugins/lua/rocklib_img.c2
-rw-r--r--apps/plugins/pictureflow/pictureflow.c2
-rw-r--r--apps/plugins/puzzles/rockbox.c2
-rw-r--r--apps/plugins/test_viewports.c2
-rw-r--r--apps/plugins/xworld/sys.c12
15 files changed, 24 insertions, 27 deletions
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES
index 942f9a5b20..85227d80d7 100644
--- a/apps/plugins/SOURCES
+++ b/apps/plugins/SOURCES
@@ -82,8 +82,7 @@ crypt_firmware.c
82 82
83/* Overlays loaders */ 83/* Overlays loaders */
84 84
85#if defined(HAVE_LCD_COLOR) && \ 85#if defined(HAVE_LCD_COLOR) && (LCD_STRIDEFORMAT == HORIZONTAL_STRIDE)
86 (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE))
87#if (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & (PLATFORM_NATIVE |PLATFORM_HOSTED)) && (defined(CPU_ARM) || defined(CPU_MIPS)) 86#if (PLUGIN_BUFFER_SIZE > 0x14000) && (CONFIG_PLATFORM & (PLATFORM_NATIVE |PLATFORM_HOSTED)) && (defined(CPU_ARM) || defined(CPU_MIPS))
88duke3d.c 87duke3d.c
89quake.c 88quake.c
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS
index 8479e4b3dd..4cb57edb1b 100644
--- a/apps/plugins/SUBDIRS
+++ b/apps/plugins/SUBDIRS
@@ -9,8 +9,7 @@ clock
9#endif 9#endif
10 10
11/* color horizontal-stride LCDs */ 11/* color horizontal-stride LCDs */
12#if defined(HAVE_LCD_COLOR) && \ 12#if defined(HAVE_LCD_COLOR) && (LCD_STRIDEFORMAT == HORIZONTAL_STRIDE)
13 (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE))
14xworld 13xworld
15 14
16/* for duke3d, wolf3d and quake */ 15/* for duke3d, wolf3d and quake */
diff --git a/apps/plugins/bitmaps/native/SOURCES b/apps/plugins/bitmaps/native/SOURCES
index f207f358b2..d0cc853f5b 100644
--- a/apps/plugins/bitmaps/native/SOURCES
+++ b/apps/plugins/bitmaps/native/SOURCES
@@ -548,8 +548,7 @@ pegbox_pieces.9x7x1.bmp
548#endif 548#endif
549 549
550/* Puzzles */ 550/* Puzzles */
551#if defined(HAVE_LCD_COLOR) && \ 551#if defined(HAVE_LCD_COLOR) && (LCD_STRIDEFORMAT == HORIZONTAL_STRIDE)
552 (!defined(LCD_STRIDEFORMAT) || (LCD_STRIDEFORMAT != VERTICAL_STRIDE))
553puzzles_cursor.11x16x24.bmp 552puzzles_cursor.11x16x24.bmp
554#endif 553#endif
555 554
diff --git a/apps/plugins/imageviewer/jpeg/yuv2rgb.c b/apps/plugins/imageviewer/jpeg/yuv2rgb.c
index 61d7fd6487..3e7f08d8bc 100644
--- a/apps/plugins/imageviewer/jpeg/yuv2rgb.c
+++ b/apps/plugins/imageviewer/jpeg/yuv2rgb.c
@@ -238,7 +238,7 @@ static fb_data (* const pixel_funcs[COLOUR_NUM_MODES][DITHER_NUM_MODES])(void) =
238}; 238};
239 239
240/* These defines are used fornormal horizontal strides and vertical strides. */ 240/* These defines are used fornormal horizontal strides and vertical strides. */
241#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 241#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
242#define LCDADDR(x, y) (lcd_fb + LCD_HEIGHT*(x) + (y)) 242#define LCDADDR(x, y) (lcd_fb + LCD_HEIGHT*(x) + (y))
243#define ROWENDOFFSET (width*LCD_HEIGHT) 243#define ROWENDOFFSET (width*LCD_HEIGHT)
244#define ROWOFFSET (1) 244#define ROWOFFSET (1)
diff --git a/apps/plugins/imageviewer/ppm/ppm_decoder.c b/apps/plugins/imageviewer/ppm/ppm_decoder.c
index 4a86be1a3a..ccb208b80b 100644
--- a/apps/plugins/imageviewer/ppm/ppm_decoder.c
+++ b/apps/plugins/imageviewer/ppm/ppm_decoder.c
@@ -177,7 +177,7 @@ static int read_ppm_row(int fd, struct ppm_info *ppm, int row)
177 int col; 177 int col;
178 int r, g, b; 178 int r, g, b;
179#ifdef HAVE_LCD_COLOR 179#ifdef HAVE_LCD_COLOR
180#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 180#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
181 fb_data *dst = (fb_data *) ppm->buf + row; 181 fb_data *dst = (fb_data *) ppm->buf + row;
182 const int stride = ppm->x; 182 const int stride = ppm->x;
183#else 183#else
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index a164b95cf0..d130ab6108 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -785,7 +785,7 @@ static fb_data *lcd_fb;
785/* No standard get_pixel function yet, use this hack instead */ 785/* No standard get_pixel function yet, use this hack instead */
786#if (LCD_DEPTH >= 8) 786#if (LCD_DEPTH >= 8)
787 787
788#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 788#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
789static inline fb_data get_pixel(int x, int y) 789static inline fb_data get_pixel(int x, int y)
790{ 790{
791 return lcd_fb[x*LCD_HEIGHT+y]; 791 return lcd_fb[x*LCD_HEIGHT+y];
diff --git a/apps/plugins/lib/bmp_smooth_scale.c b/apps/plugins/lib/bmp_smooth_scale.c
index c5f258cdbf..378ff96448 100644
--- a/apps/plugins/lib/bmp_smooth_scale.c
+++ b/apps/plugins/lib/bmp_smooth_scale.c
@@ -78,7 +78,7 @@ void smooth_resize_bitmap(struct bitmap *src_bmp, struct bitmap *dest_bmp)
78 fb_data *sptr, *dptr; 78 fb_data *sptr, *dptr;
79 int x, y, end; 79 int x, y, end;
80 int val_y = 0, val_x; 80 int val_y = 0, val_x;
81#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 81#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
82 const int sw = src_bmp->height; 82 const int sw = src_bmp->height;
83 const int sh = src_bmp->width; 83 const int sh = src_bmp->width;
84 const int dw = dest_bmp->height; 84 const int dw = dest_bmp->height;
diff --git a/apps/plugins/lib/osd.c b/apps/plugins/lib/osd.c
index 7d6e10a410..99f77da7dc 100644
--- a/apps/plugins/lib/osd.c
+++ b/apps/plugins/lib/osd.c
@@ -106,10 +106,10 @@ static struct osd grey_osd;
106# error Unknown 2-bit format; please define macros 106# error Unknown 2-bit format; please define macros
107# endif /* LCD_PIXELFORMAT */ 107# endif /* LCD_PIXELFORMAT */
108#elif LCD_DEPTH == 16 108#elif LCD_DEPTH == 16
109# if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 109# if LCD_STRIDEFORMAT == VERTICAL_STRIDE
110# define _OSD_HEIGHT2BYTES(h) ((h)*2) 110# define _OSD_HEIGHT2BYTES(h) ((h)*2)
111# define _OSD_BYTES2HEIGHT(b) ((b)/2) 111# define _OSD_BYTES2HEIGHT(b) ((b)/2)
112# else /* !defined(LCD_STRIDEFORMAT) || LCD_STRIDEFORMAT != VERTICAL_STRIDE */ 112# else /* LCD_STRIDEFORMAT != VERTICAL_STRIDE */
113# define _OSD_WIDTH2BYTES(w) ((w)*2) 113# define _OSD_WIDTH2BYTES(w) ((w)*2)
114# define _OSD_BYTES2WIDTH(b) ((b)/2) 114# define _OSD_BYTES2WIDTH(b) ((b)/2)
115# endif /* end stride type selection */ 115# endif /* end stride type selection */
@@ -160,7 +160,7 @@ static void * _osd_lcd_init_buffers(struct osd *osd, unsigned flags,
160 160
161 rb->viewport_set_fullscreen(&osd->vp, SCREEN_MAIN); 161 rb->viewport_set_fullscreen(&osd->vp, SCREEN_MAIN);
162 162
163#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 163#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
164 int colbytes = _OSD_HEIGHT2BYTES(LCD_HEIGHT); 164 int colbytes = _OSD_HEIGHT2BYTES(LCD_HEIGHT);
165 int bytecols = *bufsize / colbytes; 165 int bytecols = *bufsize / colbytes;
166 int w = _OSD_BYTES2WIDTH(bytecols); 166 int w = _OSD_BYTES2WIDTH(bytecols);
@@ -193,7 +193,7 @@ static void * _osd_lcd_init_buffers(struct osd *osd, unsigned flags,
193 w = _OSD_BYTES2WIDTH(_OSD_WIDTH2BYTES(w)); 193 w = _OSD_BYTES2WIDTH(_OSD_WIDTH2BYTES(w));
194 osd->lcd_bitmap_stride = _OSD_BYTES2HEIGHT(_OSD_HEIGHT2BYTES(LCD_HEIGHT)); 194 osd->lcd_bitmap_stride = _OSD_BYTES2HEIGHT(_OSD_HEIGHT2BYTES(LCD_HEIGHT));
195 osd->back_bitmap_stride = h; 195 osd->back_bitmap_stride = h;
196#else /* !defined(LCD_STRIDEFORMAT) || LCD_STRIDEFORMAT != VERTICAL_STRIDE */ 196#else /* LCD_STRIDEFORMAT != VERTICAL_STRIDE */
197 int rowbytes = _OSD_WIDTH2BYTES(LCD_WIDTH); 197 int rowbytes = _OSD_WIDTH2BYTES(LCD_WIDTH);
198 int byterows = *bufsize / rowbytes; 198 int byterows = *bufsize / rowbytes;
199 int w = _OSD_BYTES2WIDTH(rowbytes); 199 int w = _OSD_BYTES2WIDTH(rowbytes);
diff --git a/apps/plugins/lib/pluginlib_bmp.c b/apps/plugins/lib/pluginlib_bmp.c
index f3edfbf425..82f84b05af 100644
--- a/apps/plugins/lib/pluginlib_bmp.c
+++ b/apps/plugins/lib/pluginlib_bmp.c
@@ -94,7 +94,7 @@ int save_bmp_file( char* filename, struct bitmap *bm )
94*/ 94*/
95void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst) 95void simple_resize_bitmap(struct bitmap *src, struct bitmap *dst)
96{ 96{
97#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 97#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
98 const int srcw = src->height; 98 const int srcw = src->height;
99 const int srch = src->width; 99 const int srch = src->width;
100 const int dstw = dst->height; 100 const int dstw = dst->height;
diff --git a/apps/plugins/lib/xlcd_scroll.c b/apps/plugins/lib/xlcd_scroll.c
index 5ac4a366e8..906f4eaae1 100644
--- a/apps/plugins/lib/xlcd_scroll.c
+++ b/apps/plugins/lib/xlcd_scroll.c
@@ -30,7 +30,7 @@
30static const unsigned short patterns[4] = {0xFFFF, 0xFF00, 0x00FF, 0x0000}; 30static const unsigned short patterns[4] = {0xFFFF, 0xFF00, 0x00FF, 0x0000};
31#endif 31#endif
32 32
33#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 33#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
34void xlcd_scroll_left(int count) 34void xlcd_scroll_left(int count)
35{ 35{
36 /*size_t dst_stride;*/ 36 /*size_t dst_stride;*/
@@ -668,4 +668,4 @@ void xlcd_scroll_down(int count)
668} 668}
669 669
670#endif /* LCD_PIXELFORMAT, LCD_DEPTH */ 670#endif /* LCD_PIXELFORMAT, LCD_DEPTH */
671#endif /* defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE */ 671#endif /* LCD_STRIDEFORMAT == VERTICAL_STRIDE */
diff --git a/apps/plugins/lua/rocklib_img.c b/apps/plugins/lua/rocklib_img.c
index b0ca769ca4..68e5325ce0 100644
--- a/apps/plugins/lua/rocklib_img.c
+++ b/apps/plugins/lua/rocklib_img.c
@@ -380,7 +380,7 @@ static inline fb_data* rli_get_element(struct rocklua_image* img, int x, int y)
380 380
381 pixel_to_native(x, y, &x, &y); 381 pixel_to_native(x, y, &x, &y);
382 382
383#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 383#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
384 /* column major address */ 384 /* column major address */
385 size_t data_address = (stride * (x - 1)) + (y - 1); 385 size_t data_address = (stride * (x - 1)) + (y - 1);
386 386
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index 0e5585681d..eec8313485 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -3101,7 +3101,7 @@ static void render_slide(struct slide_data *slide, const int alpha)
3101 3101
3102 const pix_t *ptr = &src[column * bmp->height]; 3102 const pix_t *ptr = &src[column * bmp->height];
3103 3103
3104#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 3104#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
3105#define PIXELSTEP_Y 1 3105#define PIXELSTEP_Y 1
3106#define LCDADDR(x, y) (&buffer[BUFFER_HEIGHT*(x) + (y)]) 3106#define LCDADDR(x, y) (&buffer[BUFFER_HEIGHT*(x) + (y)])
3107#else 3107#else
diff --git a/apps/plugins/puzzles/rockbox.c b/apps/plugins/puzzles/rockbox.c
index 6e34adb1db..9a82cdde10 100644
--- a/apps/plugins/puzzles/rockbox.c
+++ b/apps/plugins/puzzles/rockbox.c
@@ -1465,7 +1465,7 @@ static void rb_blitter_free(void *handle, blitter *bl)
1465static void rb_blitter_save(void *handle, blitter *bl, int x, int y) 1465static void rb_blitter_save(void *handle, blitter *bl, int x, int y)
1466{ 1466{
1467 /* no viewport offset */ 1467 /* no viewport offset */
1468#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 1468#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
1469#error no vertical stride 1469#error no vertical stride
1470#else 1470#else
1471 if(bl && bl->bmp.data) 1471 if(bl && bl->bmp.data)
diff --git a/apps/plugins/test_viewports.c b/apps/plugins/test_viewports.c
index 2bada01f79..76f1a9da9b 100644
--- a/apps/plugins/test_viewports.c
+++ b/apps/plugins/test_viewports.c
@@ -130,7 +130,7 @@ static void *test_address_fn(int x, int y)
130 130
131 struct frame_buffer_t *fb = vp0.buffer; 131 struct frame_buffer_t *fb = vp0.buffer;
132/* LCD_STRIDEFORMAT & LCD_NATIVE_STRIDE macros allow Horiz screens to work with RB */ 132/* LCD_STRIDEFORMAT & LCD_NATIVE_STRIDE macros allow Horiz screens to work with RB */
133#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 133#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
134 size_t element = (x * LCD_NATIVE_STRIDE(fb->stride)) + y; 134 size_t element = (x * LCD_NATIVE_STRIDE(fb->stride)) + y;
135#else 135#else
136 size_t element = (y * LCD_NATIVE_STRIDE(fb->stride)) + x; 136 size_t element = (y * LCD_NATIVE_STRIDE(fb->stride)) + x;
diff --git a/apps/plugins/xworld/sys.c b/apps/plugins/xworld/sys.c
index c57da9456b..a806de5297 100644
--- a/apps/plugins/xworld/sys.c
+++ b/apps/plugins/xworld/sys.c
@@ -496,7 +496,7 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16
496 for (int i = 0; i < w / 2; ++i) { 496 for (int i = 0; i < w / 2; ++i) {
497 uint8_t pix1 = *(buf + i) >> 4; 497 uint8_t pix1 = *(buf + i) >> 4;
498 uint8_t pix2 = *(buf + i) & 0xF; 498 uint8_t pix2 = *(buf + i) & 0xF;
499#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 499#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
500 framebuffer[( (h * 2) ) * 320 + i] = sys->palette[pix1]; 500 framebuffer[( (h * 2) ) * 320 + i] = sys->palette[pix1];
501 framebuffer[( (h * 2) + 1) * 320 + i] = sys->palette[pix2]; 501 framebuffer[( (h * 2) + 1) * 320 + i] = sys->palette[pix2];
502#else 502#else
@@ -515,7 +515,7 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16
515 for (int i = 0; i < w / 2; ++i) { 515 for (int i = 0; i < w / 2; ++i) {
516 uint8_t pix1 = *(buf + i) >> 4; 516 uint8_t pix1 = *(buf + i) >> 4;
517 uint8_t pix2 = *(buf + i) & 0xF; 517 uint8_t pix2 = *(buf + i) & 0xF;
518#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 518#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
519 framebuffer[(200 - h * 2 ) * 320 + ( 320 - i )] = sys->palette[pix1]; 519 framebuffer[(200 - h * 2 ) * 320 + ( 320 - i )] = sys->palette[pix1];
520 framebuffer[(200 - h * 2 - 1) * 320 + ( 320 - i )] = sys->palette[pix2]; 520 framebuffer[(200 - h * 2 - 1) * 320 + ( 320 - i )] = sys->palette[pix2];
521#else 521#else
@@ -531,7 +531,7 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16
531 else 531 else
532 { 532 {
533 int next = 0; 533 int next = 0;
534#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 534#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
535 for(int x = 0; x < w / 2; ++x) 535 for(int x = 0; x < w / 2; ++x)
536 { 536 {
537 for(int y = 0; y < h; ++y) 537 for(int y = 0; y < h; ++y)
@@ -565,7 +565,7 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16
565 struct bitmap in_bmp; 565 struct bitmap in_bmp;
566 if(sys->settings.rotation_option) 566 if(sys->settings.rotation_option)
567 { 567 {
568#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 568#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
569 in_bmp.width = 320; 569 in_bmp.width = 320;
570 in_bmp.height = 200; 570 in_bmp.height = 200;
571#else 571#else
@@ -575,7 +575,7 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16
575 } 575 }
576 else 576 else
577 { 577 {
578#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 578#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
579 in_bmp.width = 200; 579 in_bmp.width = 200;
580 in_bmp.height = 320; 580 in_bmp.height = 320;
581#else 581#else
@@ -600,7 +600,7 @@ void sys_copyRect(struct System* sys, uint16_t x, uint16_t y, uint16_t w, uint16
600 } 600 }
601 else 601 else
602 { 602 {
603#if defined(LCD_STRIDEFORMAT) && (LCD_STRIDEFORMAT == VERTICAL_STRIDE) 603#if LCD_STRIDEFORMAT == VERTICAL_STRIDE
604 for(int x = 0; x < 320; ++x) 604 for(int x = 0; x < 320; ++x)
605 { 605 {
606 for(int y = 0; y < 200; ++y) 606 for(int y = 0; y < 200; ++y)