summaryrefslogtreecommitdiff
path: root/apps/plugins/invadrox.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/plugins/invadrox.c')
-rw-r--r--apps/plugins/invadrox.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/apps/plugins/invadrox.c b/apps/plugins/invadrox.c
index ef53715753..158ad2f4d7 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -1027,7 +1027,7 @@ static inline void draw_ship(void)
1027} 1027}
1028 1028
1029 1029
1030static inline void fire_alpha(int xc, int yc, fb_data color) 1030static inline void fire_alpha(int xc, int yc, unsigned color)
1031{ 1031{
1032 int oldmode = rb->lcd_get_drawmode(); 1032 int oldmode = rb->lcd_get_drawmode();
1033 1033
@@ -1128,12 +1128,12 @@ static void move_fire(void)
1128 /* Check for hit*/ 1128 /* Check for hit*/
1129 for (i = FIRE_SPEED; i >= 0; i--) { 1129 for (i = FIRE_SPEED; i >= 0; i--) {
1130 pix = get_pixel(fire_x, fire_y + i); 1130 pix = get_pixel(fire_x, fire_y + i);
1131 if(pix == screen_white) { 1131 if(!memcmp(&pix, &screen_white, sizeof(fb_data))) {
1132 hit_white = true; 1132 hit_white = true;
1133 fire_y += i; 1133 fire_y += i;
1134 break; 1134 break;
1135 } 1135 }
1136 if(pix == screen_green) { 1136 if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
1137 hit_green = true; 1137 hit_green = true;
1138 fire_y += i; 1138 fire_y += i;
1139 break; 1139 break;
@@ -1336,7 +1336,8 @@ static void move_bombs(void)
1336 /* Check for green (ship or shield) */ 1336 /* Check for green (ship or shield) */
1337 for (j = BOMB_HEIGHT; j >= BOMB_HEIGHT - BOMB_SPEED; j--) { 1337 for (j = BOMB_HEIGHT; j >= BOMB_HEIGHT - BOMB_SPEED; j--) {
1338 bombs[i].target = 0; 1338 bombs[i].target = 0;
1339 if(get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j) == screen_green) { 1339 fb_data pix = get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j);
1340 if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
1340 /* Move to hit pixel */ 1341 /* Move to hit pixel */
1341 bombs[i].x += BOMB_WIDTH / 2; 1342 bombs[i].x += BOMB_WIDTH / 2;
1342 bombs[i].y += j; 1343 bombs[i].y += j;