summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-09-07 14:41:23 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-09-07 14:41:23 +0000
commit3bd943e046d155e1563f6b8e267d74f0682a4871 (patch)
tree84934afb624bc0cbfa9c3557fddac0b231725a2e
parent0f5b717c2f9d0f78586f3e36cb450c943868a1b7 (diff)
downloadrockbox-3bd943e046d155e1563f6b8e267d74f0682a4871.tar.gz
rockbox-3bd943e046d155e1563f6b8e267d74f0682a4871.zip
invadrox: make all inline functions static inline
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@28024 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--apps/plugins/invadrox.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index 50dda2b34d..b84c3653d1 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -680,12 +680,12 @@ bool aliens_down, aliens_right, hit_left_border, hit_right_border;
680#if (LCD_DEPTH >= 8) 680#if (LCD_DEPTH >= 8)
681 681
682#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE 682#if defined(LCD_STRIDEFORMAT) && LCD_STRIDEFORMAT == VERTICAL_STRIDE
683inline fb_data get_pixel(int x, int y) 683static inline fb_data get_pixel(int x, int y)
684{ 684{
685 return rb->lcd_framebuffer[x*LCD_HEIGHT+y]; 685 return rb->lcd_framebuffer[x*LCD_HEIGHT+y];
686} 686}
687#else 687#else
688inline fb_data get_pixel(int x, int y) 688static inline fb_data get_pixel(int x, int y)
689{ 689{
690 return rb->lcd_framebuffer[ytab[y] + x]; 690 return rb->lcd_framebuffer[ytab[y] + x];
691} 691}
@@ -698,7 +698,7 @@ static const unsigned char shifts[4] = {
698 6, 4, 2, 0 698 6, 4, 2, 0
699}; 699};
700/* Horizontal packing */ 700/* Horizontal packing */
701inline fb_data get_pixel(int x, int y) 701static inline fb_data get_pixel(int x, int y)
702{ 702{
703 return (rb->lcd_framebuffer[ytab[y] + (x >> 2)] >> shifts[x & 3]) & 3; 703 return (rb->lcd_framebuffer[ytab[y] + (x >> 2)] >> shifts[x & 3]) & 3;
704} 704}
@@ -707,7 +707,7 @@ inline fb_data get_pixel(int x, int y)
707static const unsigned char shifts[4] = { 707static const unsigned char shifts[4] = {
708 0, 2, 4, 6 708 0, 2, 4, 6
709}; 709};
710inline fb_data get_pixel(int x, int y) 710static inline fb_data get_pixel(int x, int y)
711{ 711{
712 return (rb->lcd_framebuffer[ytab[y] + x] >> shifts[y & 3]) & 3; 712 return (rb->lcd_framebuffer[ytab[y] + x] >> shifts[y & 3]) & 3;
713} 713}
@@ -739,7 +739,7 @@ void draw_number(int x, int y, int num, int digits)
739} 739}
740 740
741 741
742inline void draw_score(void) 742static inline void draw_score(void)
743{ 743{
744 draw_number(SCORENUM_X, SCORENUM_Y, score, 4); 744 draw_number(SCORENUM_X, SCORENUM_Y, score, 4);
745 if (score > hiscore.score) { 745 if (score > hiscore.score) {
@@ -787,7 +787,7 @@ void draw_lives(void)
787} 787}
788 788
789 789
790inline void draw_aliens(void) 790static inline void draw_aliens(void)
791{ 791{
792 int i; 792 int i;
793 793
@@ -805,7 +805,7 @@ inline void draw_aliens(void)
805 805
806 806
807/* Return false if there is no next alive alien (round is over) */ 807/* Return false if there is no next alive alien (round is over) */
808inline bool next_alien(void) 808static inline bool next_alien(void)
809{ 809{
810 bool ret = true; 810 bool ret = true;
811 811
@@ -954,7 +954,7 @@ bool move_aliens(void)
954} 954}
955 955
956 956
957inline void draw_ship(void) 957static inline void draw_ship(void)
958{ 958{
959 /* Erase old ship */ 959 /* Erase old ship */
960 if (old_ship_x < ship_x) { 960 if (old_ship_x < ship_x) {
@@ -988,7 +988,7 @@ inline void draw_ship(void)
988} 988}
989 989
990 990
991inline void fire_alpha(int xc, int yc, fb_data color) 991static inline void fire_alpha(int xc, int yc, fb_data color)
992{ 992{
993 int oldmode = rb->lcd_get_drawmode(); 993 int oldmode = rb->lcd_get_drawmode();
994 994
@@ -1180,7 +1180,7 @@ void move_fire(void)
1180 1180
1181 1181
1182/* Return a BOMBER alien */ 1182/* Return a BOMBER alien */
1183inline int random_bomber(void) 1183static inline int random_bomber(void)
1184{ 1184{
1185 int i, col; 1185 int i, col;
1186 1186
@@ -1206,7 +1206,7 @@ inline int random_bomber(void)
1206} 1206}
1207 1207
1208 1208
1209inline void draw_bomb(int i) 1209static inline void draw_bomb(int i)
1210{ 1210{
1211 rb->lcd_bitmap_part(invadrox_bombs, bombs[i].type * BOMB_WIDTH, 1211 rb->lcd_bitmap_part(invadrox_bombs, bombs[i].type * BOMB_WIDTH,
1212 bombs[i].frame * BOMB_HEIGHT, 1212 bombs[i].frame * BOMB_HEIGHT,
@@ -1367,7 +1367,7 @@ void move_bombs(void)
1367} 1367}
1368 1368
1369 1369
1370inline void move_ship(void) 1370static inline void move_ship(void)
1371{ 1371{
1372 ship_dir += ship_acc; 1372 ship_dir += ship_acc;
1373 if (ship_dir > max_ship_speed) { 1373 if (ship_dir > max_ship_speed) {