summaryrefslogtreecommitdiff
path: root/apps
diff options
context:
space:
mode:
authorBertrik Sikken <bertrik@sikken.nl>2011-12-28 11:32:13 +0000
committerBertrik Sikken <bertrik@sikken.nl>2011-12-28 11:32:13 +0000
commitd2cdd80f5cceb38f9add911f289d566f85a4c186 (patch)
treeb125f4b3eb73562668a3299714f20490237d8b4b /apps
parent7949dd4daebe7f058839ecc22f653ee38064d97f (diff)
downloadrockbox-d2cdd80f5cceb38f9add911f289d566f85a4c186.tar.gz
rockbox-d2cdd80f5cceb38f9add911f289d566f85a4c186.zip
plugins: another round of making local things static and adding missing #includes
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@31453 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps')
-rw-r--r--apps/plugins/alpine_cdc.c2
-rw-r--r--apps/plugins/goban/goban.c2
-rw-r--r--apps/plugins/imageviewer/jpeg/jpeg_decoder.c13
-rw-r--r--apps/plugins/imageviewer/png/png_decoder.c2
-rw-r--r--apps/plugins/jackpot.c4
-rw-r--r--apps/plugins/metronome.c4
-rw-r--r--apps/plugins/pictureflow/pictureflow.c78
-rw-r--r--apps/plugins/rockboy/emu.c1
-rw-r--r--apps/plugins/rockboy/lcdc.c1
-rw-r--r--apps/plugins/rockboy/loader.c1
-rw-r--r--apps/plugins/rockboy/save.c1
11 files changed, 57 insertions, 52 deletions
diff --git a/apps/plugins/alpine_cdc.c b/apps/plugins/alpine_cdc.c
index bf8bfeaae1..653c968ffa 100644
--- a/apps/plugins/alpine_cdc.c
+++ b/apps/plugins/alpine_cdc.c
@@ -1112,7 +1112,7 @@ void thread(void)
1112} 1112}
1113 1113
1114/* callback to end the TSR plugin, called before a new one gets loaded */ 1114/* callback to end the TSR plugin, called before a new one gets loaded */
1115bool exit_tsr(bool reenter) 1115static bool exit_tsr(bool reenter)
1116{ 1116{
1117 if (reenter) 1117 if (reenter)
1118 return false; /* dont let it start again */ 1118 return false; /* dont let it start again */
diff --git a/apps/plugins/goban/goban.c b/apps/plugins/goban/goban.c
index b2306c00a8..c20724ed70 100644
--- a/apps/plugins/goban/goban.c
+++ b/apps/plugins/goban/goban.c
@@ -745,7 +745,7 @@ do_main_menu (void)
745 return false; 745 return false;
746} 746}
747 747
748void 748static void
749zoom_preview (int current) 749zoom_preview (int current)
750{ 750{
751 set_zoom_display (current); 751 set_zoom_display (current);
diff --git a/apps/plugins/imageviewer/jpeg/jpeg_decoder.c b/apps/plugins/imageviewer/jpeg/jpeg_decoder.c
index c90bff87a4..3c43c5d303 100644
--- a/apps/plugins/imageviewer/jpeg/jpeg_decoder.c
+++ b/apps/plugins/imageviewer/jpeg/jpeg_decoder.c
@@ -144,7 +144,7 @@ INLINE unsigned range_limit(int value)
144* Perform dequantization and inverse DCT on one block of coefficients, 144* Perform dequantization and inverse DCT on one block of coefficients,
145* producing a reduced-size 1x1 output block. 145* producing a reduced-size 1x1 output block.
146*/ 146*/
147void idct1x1(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line) 147static void idct1x1(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
148{ 148{
149 (void)skip_line; /* unused */ 149 (void)skip_line; /* unused */
150 *p_byte = range_limit(inptr[0] * quantptr[0] >> 3); 150 *p_byte = range_limit(inptr[0] * quantptr[0] >> 3);
@@ -156,7 +156,7 @@ void idct1x1(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
156* Perform dequantization and inverse DCT on one block of coefficients, 156* Perform dequantization and inverse DCT on one block of coefficients,
157* producing a reduced-size 2x2 output block. 157* producing a reduced-size 2x2 output block.
158*/ 158*/
159void idct2x2(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line) 159static void idct2x2(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
160{ 160{
161 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5; 161 int tmp0, tmp1, tmp2, tmp3, tmp4, tmp5;
162 unsigned char* outptr; 162 unsigned char* outptr;
@@ -198,7 +198,7 @@ void idct2x2(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
198* Perform dequantization and inverse DCT on one block of coefficients, 198* Perform dequantization and inverse DCT on one block of coefficients,
199* producing a reduced-size 4x4 output block. 199* producing a reduced-size 4x4 output block.
200*/ 200*/
201void idct4x4(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line) 201static void idct4x4(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
202{ 202{
203 int tmp0, tmp2, tmp10, tmp12; 203 int tmp0, tmp2, tmp10, tmp12;
204 int z1, z2, z3; 204 int z1, z2, z3;
@@ -282,7 +282,7 @@ void idct4x4(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
282/* 282/*
283* Perform dequantization and inverse DCT on one block of coefficients. 283* Perform dequantization and inverse DCT on one block of coefficients.
284*/ 284*/
285void idct8x8(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line) 285static void idct8x8(unsigned char* p_byte, int* inptr, int* quantptr, int skip_line)
286{ 286{
287 long tmp0, tmp1, tmp2, tmp3; 287 long tmp0, tmp1, tmp2, tmp3;
288 long tmp10, tmp11, tmp12, tmp13; 288 long tmp10, tmp11, tmp12, tmp13;
@@ -794,7 +794,7 @@ void default_huff_tbl(struct jpeg* p_jpeg)
794} 794}
795 795
796/* Compute the derived values for a Huffman table */ 796/* Compute the derived values for a Huffman table */
797void fix_huff_tbl(int* htbl, struct derived_tbl* dtbl) 797static void fix_huff_tbl(int* htbl, struct derived_tbl* dtbl)
798{ 798{
799 int p, i, l, si; 799 int p, i, l, si;
800 int lookbits, ctr; 800 int lookbits, ctr;
@@ -1081,7 +1081,7 @@ INLINE void drop_bits(struct bitstream* pb, int nbits)
1081} 1081}
1082 1082
1083/* re-synchronize to entropy data (skip restart marker) */ 1083/* re-synchronize to entropy data (skip restart marker) */
1084void search_restart(struct bitstream* pb) 1084static void search_restart(struct bitstream* pb)
1085{ 1085{
1086 pb->next_input_byte--; /* we may have overread it, taking 2 bytes */ 1086 pb->next_input_byte--; /* we may have overread it, taking 2 bytes */
1087 /* search for a non-byte-padding marker, has to be RSTm or EOS */ 1087 /* search for a non-byte-padding marker, has to be RSTm or EOS */
@@ -1245,6 +1245,7 @@ int jpeg_decode(struct jpeg* p_jpeg, unsigned char* p_pixel[3],
1245 else return -1; /* not supported */ 1245 else return -1; /* not supported */
1246 1246
1247 /* init bitstream, fake a restart to make it start */ 1247 /* init bitstream, fake a restart to make it start */
1248 bs.get_buffer = 0;
1248 bs.next_input_byte = p_jpeg->p_entropy_data; 1249 bs.next_input_byte = p_jpeg->p_entropy_data;
1249 bs.bits_left = 0; 1250 bs.bits_left = 0;
1250 bs.input_end = p_jpeg->p_entropy_end; 1251 bs.input_end = p_jpeg->p_entropy_end;
diff --git a/apps/plugins/imageviewer/png/png_decoder.c b/apps/plugins/imageviewer/png/png_decoder.c
index bae1fe3321..5c7b43fbdf 100644
--- a/apps/plugins/imageviewer/png/png_decoder.c
+++ b/apps/plugins/imageviewer/png/png_decoder.c
@@ -383,7 +383,7 @@ static void LodePNG_InfoPng_init(LodePNG_InfoPng* info)
383#endif 383#endif
384} 384}
385 385
386void LodePNG_InfoPng_cleanup(LodePNG_InfoPng* info) 386static void LodePNG_InfoPng_cleanup(LodePNG_InfoPng* info)
387{ 387{
388 LodePNG_InfoColor_cleanup(&info->color); 388 LodePNG_InfoColor_cleanup(&info->color);
389} 389}
diff --git a/apps/plugins/jackpot.c b/apps/plugins/jackpot.c
index aa9defd1eb..b380e85180 100644
--- a/apps/plugins/jackpot.c
+++ b/apps/plugins/jackpot.c
@@ -93,14 +93,14 @@ struct jackpot
93}; 93};
94 94
95#ifdef HAVE_LCD_CHARCELLS 95#ifdef HAVE_LCD_CHARCELLS
96void patterns_init(struct screen* display) 96static void patterns_init(struct screen* display)
97{ 97{
98 int i; 98 int i;
99 for(i=0;i<NB_SLOTS;i++) 99 for(i=0;i<NB_SLOTS;i++)
100 char_patterns[i]=display->get_locked_pattern(); 100 char_patterns[i]=display->get_locked_pattern();
101} 101}
102 102
103void patterns_deinit(struct screen* display) 103static void patterns_deinit(struct screen* display)
104{ 104{
105 /* Restore the old pattern */ 105 /* Restore the old pattern */
106 int i; 106 int i;
diff --git a/apps/plugins/metronome.c b/apps/plugins/metronome.c
index 2db7f7799b..da035a7688 100644
--- a/apps/plugins/metronome.c
+++ b/apps/plugins/metronome.c
@@ -683,7 +683,7 @@ int bpm_step_counter = 0;
683#define MET_IS_PLAYING rb->mp3_is_playing() 683#define MET_IS_PLAYING rb->mp3_is_playing()
684#define MET_PLAY_STOP rb->mp3_play_stop() 684#define MET_PLAY_STOP rb->mp3_play_stop()
685 685
686void callback(unsigned char** start, size_t* size) 686static void callback(unsigned char** start, size_t* size)
687{ 687{
688 (void)start; /* unused parameter, avoid warning */ 688 (void)start; /* unused parameter, avoid warning */
689 *size = 0; /* end of data */ 689 *size = 0; /* end of data */
@@ -691,7 +691,7 @@ void callback(unsigned char** start, size_t* size)
691 rb->led(0); 691 rb->led(0);
692} 692}
693 693
694void play_tock(void) 694static void play_tock(void)
695{ 695{
696 sound_active = true; 696 sound_active = true;
697 rb->led(1); 697 rb->led(1);
diff --git a/apps/plugins/pictureflow/pictureflow.c b/apps/plugins/pictureflow/pictureflow.c
index ee92ab8737..1b9683460e 100644
--- a/apps/plugins/pictureflow/pictureflow.c
+++ b/apps/plugins/pictureflow/pictureflow.c
@@ -808,7 +808,7 @@ static void update_scroll_lines(void)
808} 808}
809 809
810/* Create the lookup table with the scaling values for the reflections */ 810/* Create the lookup table with the scaling values for the reflections */
811void init_reflect_table(void) 811static void init_reflect_table(void)
812{ 812{
813 int i; 813 int i;
814 for (i = 0; i < REFLECT_HEIGHT; i++) 814 for (i = 0; i < REFLECT_HEIGHT; i++)
@@ -821,7 +821,7 @@ void init_reflect_table(void)
821 Create an index of all albums from the database. 821 Create an index of all albums from the database.
822 Also store the album names so we can access them later. 822 Also store the album names so we can access them later.
823 */ 823 */
824int create_album_index(void) 824static int create_album_index(void)
825{ 825{
826 album = ((struct album_data *)(buf_size + (char *) buf)) - 1; 826 album = ((struct album_data *)(buf_size + (char *) buf)) - 1;
827 rb->memset(&tcs, 0, sizeof(struct tagcache_search) ); 827 rb->memset(&tcs, 0, sizeof(struct tagcache_search) );
@@ -860,7 +860,7 @@ int create_album_index(void)
860/** 860/**
861 Return a pointer to the album name of the given slide_index 861 Return a pointer to the album name of the given slide_index
862 */ 862 */
863char* get_album_name(const int slide_index) 863static char* get_album_name(const int slide_index)
864{ 864{
865 return album_names + album[slide_index].name_idx; 865 return album_names + album[slide_index].name_idx;
866} 866}
@@ -869,14 +869,14 @@ char* get_album_name(const int slide_index)
869 Return a pointer to the track name of the active album 869 Return a pointer to the track name of the active album
870 create_track_index has to be called first. 870 create_track_index has to be called first.
871 */ 871 */
872char* get_track_name(const int track_index) 872static char* get_track_name(const int track_index)
873{ 873{
874 if ( track_index < track_count ) 874 if ( track_index < track_count )
875 return track_names + tracks[track_index].name_idx; 875 return track_names + tracks[track_index].name_idx;
876 return 0; 876 return 0;
877} 877}
878#if PF_PLAYBACK_CAPABLE 878#if PF_PLAYBACK_CAPABLE
879char* get_track_filename(const int track_index) 879static char* get_track_filename(const int track_index)
880{ 880{
881 if ( track_index < track_count ) 881 if ( track_index < track_count )
882 return track_names + tracks[track_index].filename_idx; 882 return track_names + tracks[track_index].filename_idx;
@@ -884,7 +884,7 @@ char* get_track_filename(const int track_index)
884} 884}
885#endif 885#endif
886 886
887int get_wps_current_index(void) 887static int get_wps_current_index(void)
888{ 888{
889 struct mp3entry *id3 = rb->audio_current_track(); 889 struct mp3entry *id3 = rb->audio_current_track();
890 if(id3 && id3->album) { 890 if(id3 && id3->album) {
@@ -901,7 +901,7 @@ int get_wps_current_index(void)
901/** 901/**
902 Compare two unsigned ints passed via pointers. 902 Compare two unsigned ints passed via pointers.
903 */ 903 */
904int compare_tracks (const void *a_v, const void *b_v) 904static int compare_tracks (const void *a_v, const void *b_v)
905{ 905{
906 uint32_t a = ((struct track_data *)a_v)->sort; 906 uint32_t a = ((struct track_data *)a_v)->sort;
907 uint32_t b = ((struct track_data *)b_v)->sort; 907 uint32_t b = ((struct track_data *)b_v)->sort;
@@ -911,7 +911,7 @@ int compare_tracks (const void *a_v, const void *b_v)
911/** 911/**
912 Create the track index of the given slide_index. 912 Create the track index of the given slide_index.
913 */ 913 */
914void create_track_index(const int slide_index) 914static void create_track_index(const int slide_index)
915{ 915{
916 if ( slide_index == track_index ) 916 if ( slide_index == track_index )
917 return; 917 return;
@@ -1022,7 +1022,7 @@ fail:
1022 The algorithm looks for the first track of the given album uses 1022 The algorithm looks for the first track of the given album uses
1023 find_albumart to find the filename. 1023 find_albumart to find the filename.
1024 */ 1024 */
1025bool get_albumart_for_index_from_db(const int slide_index, char *buf, 1025static bool get_albumart_for_index_from_db(const int slide_index, char *buf,
1026 int buflen) 1026 int buflen)
1027{ 1027{
1028 if ( slide_index == -1 ) 1028 if ( slide_index == -1 )
@@ -1069,7 +1069,7 @@ bool get_albumart_for_index_from_db(const int slide_index, char *buf,
1069/** 1069/**
1070 Draw the PictureFlow logo 1070 Draw the PictureFlow logo
1071 */ 1071 */
1072void draw_splashscreen(void) 1072static void draw_splashscreen(void)
1073{ 1073{
1074 unsigned char * buf_tmp = buf; 1074 unsigned char * buf_tmp = buf;
1075 size_t buf_tmp_size = buf_size; 1075 size_t buf_tmp_size = buf_size;
@@ -1116,7 +1116,7 @@ void draw_splashscreen(void)
1116/** 1116/**
1117 Draw a simple progress bar 1117 Draw a simple progress bar
1118 */ 1118 */
1119void draw_progressbar(int step) 1119static void draw_progressbar(int step)
1120{ 1120{
1121 int txt_w, txt_h; 1121 int txt_w, txt_h;
1122 const int bar_height = 22; 1122 const int bar_height = 22;
@@ -1149,7 +1149,7 @@ void draw_progressbar(int step)
1149/* Calculate modified FNV hash of string 1149/* Calculate modified FNV hash of string
1150 * has good avalanche behaviour and uniform distribution 1150 * has good avalanche behaviour and uniform distribution
1151 * see http://home.comcast.net/~bretm/hash/ */ 1151 * see http://home.comcast.net/~bretm/hash/ */
1152unsigned int mfnv(char *str) 1152static unsigned int mfnv(char *str)
1153{ 1153{
1154 const unsigned int p = 16777619; 1154 const unsigned int p = 16777619;
1155 unsigned int hash = 0x811C9DC5; // 2166136261; 1155 unsigned int hash = 0x811C9DC5; // 2166136261;
@@ -1167,7 +1167,7 @@ unsigned int mfnv(char *str)
1167/** 1167/**
1168 Save the given bitmap as filename in the pfraw format 1168 Save the given bitmap as filename in the pfraw format
1169 */ 1169 */
1170bool save_pfraw(char* filename, struct bitmap *bm) 1170static bool save_pfraw(char* filename, struct bitmap *bm)
1171{ 1171{
1172 struct pfraw_header bmph; 1172 struct pfraw_header bmph;
1173 bmph.width = bm->width; 1173 bmph.width = bm->width;
@@ -1190,7 +1190,7 @@ bool save_pfraw(char* filename, struct bitmap *bm)
1190 Precomupte the album art images and store them in CACHE_PREFIX. 1190 Precomupte the album art images and store them in CACHE_PREFIX.
1191 Use the "?" bitmap if image is not found. 1191 Use the "?" bitmap if image is not found.
1192 */ 1192 */
1193bool create_albumart_cache(void) 1193static bool create_albumart_cache(void)
1194{ 1194{
1195 int ret; 1195 int ret;
1196 1196
@@ -1254,7 +1254,7 @@ bool create_albumart_cache(void)
1254 Create the "?" slide, that is shown while loading 1254 Create the "?" slide, that is shown while loading
1255 or when no cover was found. 1255 or when no cover was found.
1256 */ 1256 */
1257int create_empty_slide(bool force) 1257static int create_empty_slide(bool force)
1258{ 1258{
1259 if ( force || ! rb->file_exists( EMPTY_SLIDE ) ) { 1259 if ( force || ! rb->file_exists( EMPTY_SLIDE ) ) {
1260 struct bitmap input_bmp; 1260 struct bitmap input_bmp;
@@ -1278,7 +1278,7 @@ int create_empty_slide(bool force)
1278/** 1278/**
1279 Thread used for loading and preparing bitmaps in the background 1279 Thread used for loading and preparing bitmaps in the background
1280 */ 1280 */
1281void thread(void) 1281static void thread(void)
1282{ 1282{
1283 long sleep_time = 5 * HZ; 1283 long sleep_time = 5 * HZ;
1284 struct queue_event ev; 1284 struct queue_event ev;
@@ -1306,7 +1306,7 @@ void thread(void)
1306/** 1306/**
1307 End the thread by posting the EV_EXIT event 1307 End the thread by posting the EV_EXIT event
1308 */ 1308 */
1309void end_pf_thread(void) 1309static void end_pf_thread(void)
1310{ 1310{
1311 if ( thread_is_running ) { 1311 if ( thread_is_running ) {
1312 rb->queue_post(&thread_q, EV_EXIT, 0); 1312 rb->queue_post(&thread_q, EV_EXIT, 0);
@@ -1321,7 +1321,7 @@ void end_pf_thread(void)
1321/** 1321/**
1322 Create the thread an setup the event queue 1322 Create the thread an setup the event queue
1323 */ 1323 */
1324bool create_pf_thread(void) 1324static bool create_pf_thread(void)
1325{ 1325{
1326 /* put the thread's queue in the bcast list */ 1326 /* put the thread's queue in the bcast list */
1327 rb->queue_init(&thread_q, true); 1327 rb->queue_init(&thread_q, true);
@@ -1507,7 +1507,7 @@ static bool free_slide_prio(int prio)
1507/** 1507/**
1508 Read the pfraw image given as filename and return the hid of the buffer 1508 Read the pfraw image given as filename and return the hid of the buffer
1509 */ 1509 */
1510int read_pfraw(char* filename, int prio) 1510static int read_pfraw(char* filename, int prio)
1511{ 1511{
1512 struct pfraw_header bmph; 1512 struct pfraw_header bmph;
1513 int fh = rb->open(filename, O_RDONLY); 1513 int fh = rb->open(filename, O_RDONLY);
@@ -1727,7 +1727,7 @@ static inline struct dim *surface(const int slide_index)
1727/** 1727/**
1728 adjust slides so that they are in "steady state" position 1728 adjust slides so that they are in "steady state" position
1729 */ 1729 */
1730void reset_slides(void) 1730static void reset_slides(void)
1731{ 1731{
1732 center_slide.angle = 0; 1732 center_slide.angle = 0;
1733 center_slide.cx = 0; 1733 center_slide.cx = 0;
@@ -1768,7 +1768,7 @@ void reset_slides(void)
1768 * z 1768 * z
1769 * TODO: support moving the side slides toward or away from the camera 1769 * TODO: support moving the side slides toward or away from the camera
1770 */ 1770 */
1771void recalc_offsets(void) 1771static void recalc_offsets(void)
1772{ 1772{
1773 PFreal xs = PFREAL_HALF - DISPLAY_WIDTH * PFREAL_HALF; 1773 PFreal xs = PFREAL_HALF - DISPLAY_WIDTH * PFREAL_HALF;
1774 PFreal zo; 1774 PFreal zo;
@@ -1844,7 +1844,7 @@ static inline unsigned fade_color(pix_t c, unsigned a)
1844 * optimized by saving the numerator and denominator of the fraction, which can 1844 * optimized by saving the numerator and denominator of the fraction, which can
1845 * then be incremented by (z + zo) and sin(r) respectively. 1845 * then be incremented by (z + zo) and sin(r) respectively.
1846 */ 1846 */
1847void render_slide(struct slide_data *slide, const int alpha) 1847static void render_slide(struct slide_data *slide, const int alpha)
1848{ 1848{
1849 struct dim *bmp = surface(slide->slide_index); 1849 struct dim *bmp = surface(slide->slide_index);
1850 if (!bmp) { 1850 if (!bmp) {
@@ -1989,7 +1989,7 @@ static inline void set_current_slide(const int slide_index)
1989/** 1989/**
1990 Start the animation for changing slides 1990 Start the animation for changing slides
1991 */ 1991 */
1992void start_animation(void) 1992static void start_animation(void)
1993{ 1993{
1994 step = (target < center_slide.slide_index) ? -1 : 1; 1994 step = (target < center_slide.slide_index) ? -1 : 1;
1995 pf_state = pf_scrolling; 1995 pf_state = pf_scrolling;
@@ -1998,7 +1998,7 @@ void start_animation(void)
1998/** 1998/**
1999 Go to the previous slide 1999 Go to the previous slide
2000 */ 2000 */
2001void show_previous_slide(void) 2001static void show_previous_slide(void)
2002{ 2002{
2003 if (step == 0) { 2003 if (step == 0) {
2004 if (center_index > 0) { 2004 if (center_index > 0) {
@@ -2017,7 +2017,7 @@ void show_previous_slide(void)
2017/** 2017/**
2018 Go to the next slide 2018 Go to the next slide
2019 */ 2019 */
2020void show_next_slide(void) 2020static void show_next_slide(void)
2021{ 2021{
2022 if (step == 0) { 2022 if (step == 0) {
2023 if (center_index < number_of_slides - 1) { 2023 if (center_index < number_of_slides - 1) {
@@ -2036,7 +2036,7 @@ void show_next_slide(void)
2036/** 2036/**
2037 Render the slides. Updates only the offscreen buffer. 2037 Render the slides. Updates only the offscreen buffer.
2038*/ 2038*/
2039void render_all_slides(void) 2039static void render_all_slides(void)
2040{ 2040{
2041 mylcd_set_background(G_BRIGHT(0)); 2041 mylcd_set_background(G_BRIGHT(0));
2042 /* TODO: Optimizes this by e.g. invalidating rects */ 2042 /* TODO: Optimizes this by e.g. invalidating rects */
@@ -2091,7 +2091,7 @@ void render_all_slides(void)
2091/** 2091/**
2092 Updates the animation effect. Call this periodically from a timer. 2092 Updates the animation effect. Call this periodically from a timer.
2093*/ 2093*/
2094void update_scroll_animation(void) 2094static void update_scroll_animation(void)
2095{ 2095{
2096 if (step == 0) 2096 if (step == 0)
2097 return; 2097 return;
@@ -2193,7 +2193,7 @@ void update_scroll_animation(void)
2193/** 2193/**
2194 Cleanup the plugin 2194 Cleanup the plugin
2195*/ 2195*/
2196void cleanup(void) 2196static void cleanup(void)
2197{ 2197{
2198#ifdef HAVE_ADJUSTABLE_CPU_FREQ 2198#ifdef HAVE_ADJUSTABLE_CPU_FREQ
2199 rb->cpu_boost(false); 2199 rb->cpu_boost(false);
@@ -2210,7 +2210,7 @@ void cleanup(void)
2210/** 2210/**
2211 Shows the settings menu 2211 Shows the settings menu
2212 */ 2212 */
2213int settings_menu(void) 2213static int settings_menu(void)
2214{ 2214{
2215 int selection = 0; 2215 int selection = 0;
2216 bool old_val; 2216 bool old_val;
@@ -2320,7 +2320,7 @@ enum {
2320 PF_MENU_QUIT, 2320 PF_MENU_QUIT,
2321}; 2321};
2322 2322
2323int main_menu(void) 2323static int main_menu(void)
2324{ 2324{
2325 int selection = 0; 2325 int selection = 0;
2326 int result; 2326 int result;
@@ -2371,7 +2371,7 @@ int main_menu(void)
2371/** 2371/**
2372 Animation step for zooming into the current cover 2372 Animation step for zooming into the current cover
2373 */ 2373 */
2374void update_cover_in_animation(void) 2374static void update_cover_in_animation(void)
2375{ 2375{
2376 cover_animation_keyframe++; 2376 cover_animation_keyframe++;
2377 if( cover_animation_keyframe < 20 ) { 2377 if( cover_animation_keyframe < 20 ) {
@@ -2391,7 +2391,7 @@ void update_cover_in_animation(void)
2391/** 2391/**
2392 Animation step for zooming out the current cover 2392 Animation step for zooming out the current cover
2393 */ 2393 */
2394void update_cover_out_animation(void) 2394static void update_cover_out_animation(void)
2395{ 2395{
2396 cover_animation_keyframe++; 2396 cover_animation_keyframe++;
2397 if( cover_animation_keyframe <= 15 ) { 2397 if( cover_animation_keyframe <= 15 ) {
@@ -2481,7 +2481,7 @@ void reset_track_list(void)
2481/** 2481/**
2482 Display the list of tracks 2482 Display the list of tracks
2483 */ 2483 */
2484void show_track_list(void) 2484static void show_track_list(void)
2485{ 2485{
2486 mylcd_clear_display(); 2486 mylcd_clear_display();
2487 if ( center_slide.slide_index != track_index ) { 2487 if ( center_slide.slide_index != track_index ) {
@@ -2518,7 +2518,7 @@ void show_track_list(void)
2518 } 2518 }
2519} 2519}
2520 2520
2521void select_next_track(void) 2521static void select_next_track(void)
2522{ 2522{
2523 if ( selected_track < track_count - 1 ) { 2523 if ( selected_track < track_count - 1 ) {
2524 selected_track++; 2524 selected_track++;
@@ -2527,7 +2527,7 @@ void select_next_track(void)
2527 } 2527 }
2528} 2528}
2529 2529
2530void select_prev_track(void) 2530static void select_prev_track(void)
2531{ 2531{
2532 if (selected_track > 0 ) { 2532 if (selected_track > 0 ) {
2533 if (selected_track==start_index_track_list) start_index_track_list--; 2533 if (selected_track==start_index_track_list) start_index_track_list--;
@@ -2539,7 +2539,7 @@ void select_prev_track(void)
2539/* 2539/*
2540 * Puts the current tracklist into a newly created playlist and starts playling 2540 * Puts the current tracklist into a newly created playlist and starts playling
2541 */ 2541 */
2542void start_playback(bool append) 2542static void start_playback(bool append)
2543{ 2543{
2544 static int old_playlist = -1, old_shuffle = 0; 2544 static int old_playlist = -1, old_shuffle = 0;
2545 int count = 0; 2545 int count = 0;
@@ -2584,7 +2584,7 @@ play:
2584/** 2584/**
2585 Draw the current album name 2585 Draw the current album name
2586 */ 2586 */
2587void draw_album_text(void) 2587static void draw_album_text(void)
2588{ 2588{
2589 if (show_album_name == ALBUM_NAME_HIDE) 2589 if (show_album_name == ALBUM_NAME_HIDE)
2590 return; 2590 return;
@@ -2633,7 +2633,7 @@ void draw_album_text(void)
2633/** 2633/**
2634 Display an error message and wait for input. 2634 Display an error message and wait for input.
2635*/ 2635*/
2636void error_wait(const char *message) 2636static void error_wait(const char *message)
2637{ 2637{
2638 rb->splashf(0, "%s. Press any button to continue.", message); 2638 rb->splashf(0, "%s. Press any button to continue.", message);
2639 while (rb->get_action(CONTEXT_STD, 1) == ACTION_NONE) 2639 while (rb->get_action(CONTEXT_STD, 1) == ACTION_NONE)
@@ -2645,7 +2645,7 @@ void error_wait(const char *message)
2645 Main function that also contain the main plasma 2645 Main function that also contain the main plasma
2646 algorithm. 2646 algorithm.
2647 */ 2647 */
2648int main(void) 2648static int main(void)
2649{ 2649{
2650 int ret; 2650 int ret;
2651 2651
diff --git a/apps/plugins/rockboy/emu.c b/apps/plugins/rockboy/emu.c
index 57b82cfbb1..2215c810b6 100644
--- a/apps/plugins/rockboy/emu.c
+++ b/apps/plugins/rockboy/emu.c
@@ -8,6 +8,7 @@
8#include "sound.h" 8#include "sound.h"
9#include "rtc-gb.h" 9#include "rtc-gb.h"
10#include "pcm.h" 10#include "pcm.h"
11#include "emu.h"
11 12
12/* 13/*
13 * emu_reset is called to initialize the state of the emulated 14 * emu_reset is called to initialize the state of the emulated
diff --git a/apps/plugins/rockboy/lcdc.c b/apps/plugins/rockboy/lcdc.c
index 2a1b094929..50f8a31b1a 100644
--- a/apps/plugins/rockboy/lcdc.c
+++ b/apps/plugins/rockboy/lcdc.c
@@ -6,6 +6,7 @@
6#include "regs.h" 6#include "regs.h"
7#include "lcd-gb.h" 7#include "lcd-gb.h"
8#include "fb.h" 8#include "fb.h"
9#include "lcdc.h"
9 10
10 11
11#define C (cpu.lcdc) 12#define C (cpu.lcdc)
diff --git a/apps/plugins/rockboy/loader.c b/apps/plugins/rockboy/loader.c
index 6065cf2898..5c2b260d14 100644
--- a/apps/plugins/rockboy/loader.c
+++ b/apps/plugins/rockboy/loader.c
@@ -7,6 +7,7 @@
7#include "rtc-gb.h" 7#include "rtc-gb.h"
8#include "save.h" 8#include "save.h"
9#include "sound.h" 9#include "sound.h"
10#include "loader.h"
10 11
11/* From http://www.semis.demon.co.uk/Gameboy/Gbspec.txt (4/17/2007) 12/* From http://www.semis.demon.co.uk/Gameboy/Gbspec.txt (4/17/2007)
12 * Cartridge type: 13 * Cartridge type:
diff --git a/apps/plugins/rockboy/save.c b/apps/plugins/rockboy/save.c
index 817973bcb2..d0dd3dd2b9 100644
--- a/apps/plugins/rockboy/save.c
+++ b/apps/plugins/rockboy/save.c
@@ -9,6 +9,7 @@
9#include "rtc-gb.h" 9#include "rtc-gb.h"
10#include "mem.h" 10#include "mem.h"
11#include "sound.h" 11#include "sound.h"
12#include "save.h"
12 13
13#ifdef ROCKBOX_LITTLE_ENDIAN 14#ifdef ROCKBOX_LITTLE_ENDIAN
14#define LIL(x) (x) 15#define LIL(x) (x)