1
0
Fork 0
forked from len0rd/rockbox

Fixed yellow FM builds, and changed the function type names according to the rockbox coding style.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6858 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-06-24 23:06:06 +00:00
parent 22c1a8e1d9
commit 24a1f94cd7
4 changed files with 22 additions and 18 deletions

View file

@ -443,7 +443,9 @@ bool radio_screen(void)
/* Only display the peak meter when not recording */
if(!audio_status())
{
lcd_clearrect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
lcd_fillrect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
lcd_set_drawmode(DRMODE_SOLID);
peak_meter_draw(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
lcd_update_rect(0, 8 + fh*(top_of_screen + 3), LCD_WIDTH, fh);
}
@ -477,7 +479,9 @@ bool radio_screen(void)
}
else
{
lcd_clearrect(0, 8 + top_of_screen*fh, LCD_WIDTH, fh);
lcd_set_drawmode(DRMODE_SOLID|DRMODE_INVERSEVID);
lcd_fillrect(0, 8 + top_of_screen*fh, LCD_WIDTH, fh);
lcd_set_drawmode(DRMODE_SOLID);
}
freq = curr_freq / 100000;

View file

@ -331,7 +331,7 @@ static void nopixel(int x, int y)
(void)y;
}
tLCDPixelFunc* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel,
lcd_pixelfunc_type* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel,
nopixel, clearpixel, nopixel, clearpixel};
static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
@ -354,7 +354,7 @@ static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
*address = (*address & ~mask) | (bits & mask);
}
tLCDBlockFunc* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock};
lcd_blockfunc_type* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock};
/*** drawing functions ***/
@ -384,7 +384,7 @@ void lcd_drawline(int x1, int y1, int x2, int y2)
int d, dinc1, dinc2;
int x, xinc1, xinc2;
int y, yinc1, yinc2;
tLCDPixelFunc *pfunc = pixelfunc[drawmode];
lcd_pixelfunc_type *pfunc = pixelfunc[drawmode];
deltax = abs(x2 - x1);
deltay = abs(y2 - y1);
@ -452,7 +452,7 @@ void lcd_hline(int x1, int x2, int y)
int x;
unsigned char *dst;
unsigned char mask, bits;
tLCDBlockFunc *bfunc;
lcd_blockfunc_type *bfunc;
/* direction flip */
if (x2 < x1)
@ -487,7 +487,7 @@ void lcd_vline(int x, int y1, int y2)
int ny;
unsigned char *dst;
unsigned char mask_top, mask_bottom, bits;
tLCDBlockFunc *bfunc;
lcd_blockfunc_type *bfunc;
/* direction flip */
if (y2 < y1)
@ -547,7 +547,7 @@ void lcd_drawrect(int x, int y, int width, int height)
}
/* helper function for lcd_fillrect() */
static void fillrow(tLCDBlockFunc *bfunc, unsigned char *address,
static void fillrow(lcd_blockfunc_type *bfunc, unsigned char *address,
int width, unsigned mask, unsigned bits)
{
int i;
@ -562,7 +562,7 @@ void lcd_fillrect(int x, int y, int width, int height)
int ny;
unsigned char *dst;
unsigned char mask_top, mask_bottom, bits;
tLCDBlockFunc *bfunc;
lcd_blockfunc_type *bfunc;
bool fillopt = (drawmode & DRMODE_INVERSEVID) ?
(drawmode & DRMODE_BG) : (drawmode & DRMODE_FG);

View file

@ -390,7 +390,7 @@ static void nopixel(int x, int y)
(void)y;
}
tLCDPixelFunc* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel,
lcd_pixelfunc_type* pixelfunc[8] = {flippixel, nopixel, setpixel, setpixel,
nopixel, clearpixel, nopixel, clearpixel};
static void flipblock(unsigned char *address, unsigned mask, unsigned bits)
@ -413,7 +413,7 @@ static void solidblock(unsigned char *address, unsigned mask, unsigned bits)
*address = (*address & ~mask) | (bits & mask);
}
tLCDBlockFunc* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock};
lcd_blockfunc_type* blockfunc[4] = {flipblock, bgblock, fgblock, solidblock};
/*** drawing functions ***/
@ -443,7 +443,7 @@ void lcd_drawline(int x1, int y1, int x2, int y2)
int d, dinc1, dinc2;
int x, xinc1, xinc2;
int y, yinc1, yinc2;
tLCDPixelFunc *pfunc = pixelfunc[drawmode];
lcd_pixelfunc_type *pfunc = pixelfunc[drawmode];
deltax = abs(x2 - x1);
deltay = abs(y2 - y1);
@ -511,7 +511,7 @@ void lcd_hline(int x1, int x2, int y)
int x;
unsigned char *dst;
unsigned char mask, bits;
tLCDBlockFunc *bfunc;
lcd_blockfunc_type *bfunc;
/* direction flip */
if (x2 < x1)
@ -546,7 +546,7 @@ void lcd_vline(int x, int y1, int y2)
int ny;
unsigned char *dst;
unsigned char mask_top, mask_bottom, bits;
tLCDBlockFunc *bfunc;
lcd_blockfunc_type *bfunc;
/* direction flip */
if (y2 < y1)
@ -606,7 +606,7 @@ void lcd_drawrect(int x, int y, int width, int height)
}
/* helper function for lcd_fillrect() */
static void fillrow(tLCDBlockFunc *bfunc, unsigned char *address,
static void fillrow(lcd_blockfunc_type *bfunc, unsigned char *address,
int width, unsigned mask, unsigned bits)
{
int i;
@ -621,7 +621,7 @@ void lcd_fillrect(int x, int y, int width, int height)
int ny;
unsigned char *dst;
unsigned char mask_top, mask_bottom, bits;
tLCDBlockFunc *bfunc;
lcd_blockfunc_type *bfunc;
bool fillopt = (drawmode & DRMODE_INVERSEVID) ?
(drawmode & DRMODE_BG) : (drawmode & DRMODE_FG);

View file

@ -126,8 +126,8 @@ extern void lcd_jump_scroll_delay(int ms);
#define CLEAR_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] &= ~(1<<((y)&7))
#define INVERT_PIXEL(x,y) lcd_framebuffer[(y)/8][(x)] ^= (1<<((y)&7))
typedef void tLCDPixelFunc(int x, int y); /* for b&w */
typedef void tLCDBlockFunc(unsigned char *address, unsigned mask, unsigned bits);
typedef void lcd_pixelfunc_type(int x, int y); /* for b&w */
typedef void lcd_blockfunc_type(unsigned char *address, unsigned mask, unsigned bits);
/* Memory copy of display bitmap */
extern unsigned char lcd_framebuffer[LCD_HEIGHT/8][LCD_WIDTH];