diff options
Diffstat (limited to 'apps/plugins/lib/gray_parm.c')
-rw-r--r-- | apps/plugins/lib/gray_parm.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/apps/plugins/lib/gray_parm.c b/apps/plugins/lib/gray_parm.c index a8c238a4eb..c4ee92f9cc 100644 --- a/apps/plugins/lib/gray_parm.c +++ b/apps/plugins/lib/gray_parm.c | |||
@@ -53,7 +53,7 @@ int gray_get_drawmode(void) | |||
53 | } | 53 | } |
54 | 54 | ||
55 | /* Set the foreground shade for subsequent drawing operations */ | 55 | /* Set the foreground shade for subsequent drawing operations */ |
56 | void gray_set_foreground(int brightness) | 56 | void gray_set_foreground(unsigned brightness) |
57 | { | 57 | { |
58 | unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127; | 58 | unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127; |
59 | 59 | ||
@@ -61,14 +61,14 @@ void gray_set_foreground(int brightness) | |||
61 | } | 61 | } |
62 | 62 | ||
63 | /* Return the current foreground shade */ | 63 | /* Return the current foreground shade */ |
64 | int gray_get_foreground(void) | 64 | unsigned gray_get_foreground(void) |
65 | { | 65 | { |
66 | return (_gray_info.fg_brightness * 255 + (_gray_info.depth >> 1)) | 66 | return (_gray_info.fg_brightness * 255 + (_gray_info.depth >> 1)) |
67 | / _gray_info.depth; | 67 | / _gray_info.depth; |
68 | } | 68 | } |
69 | 69 | ||
70 | /* Set the background shade for subsequent drawing operations */ | 70 | /* Set the background shade for subsequent drawing operations */ |
71 | void gray_set_background(int brightness) | 71 | void gray_set_background(unsigned brightness) |
72 | { | 72 | { |
73 | unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127; | 73 | unsigned data = MULU16(_gray_info.depth, brightness & 0xFF) + 127; |
74 | 74 | ||
@@ -76,14 +76,14 @@ void gray_set_background(int brightness) | |||
76 | } | 76 | } |
77 | 77 | ||
78 | /* Return the current background shade */ | 78 | /* Return the current background shade */ |
79 | int gray_get_background(void) | 79 | unsigned gray_get_background(void) |
80 | { | 80 | { |
81 | return (_gray_info.bg_brightness * 255 + (_gray_info.depth >> 1)) | 81 | return (_gray_info.bg_brightness * 255 + (_gray_info.depth >> 1)) |
82 | / _gray_info.depth; | 82 | / _gray_info.depth; |
83 | } | 83 | } |
84 | 84 | ||
85 | /* Set draw mode, foreground and background shades at once */ | 85 | /* Set draw mode, foreground and background shades at once */ |
86 | void gray_set_drawinfo(int mode, int fg_brightness, int bg_brightness) | 86 | void gray_set_drawinfo(int mode, unsigned fg_brightness, unsigned bg_brightness) |
87 | { | 87 | { |
88 | gray_set_drawmode(mode); | 88 | gray_set_drawmode(mode); |
89 | gray_set_foreground(fg_brightness); | 89 | gray_set_foreground(fg_brightness); |