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 ef53715..158ad2f 100644
--- a/apps/plugins/invadrox.c
+++ b/apps/plugins/invadrox.c
@@ -1027,7 +1027,7 @@ static inline void draw_ship(void)
}
-static inline void fire_alpha(int xc, int yc, fb_data color)
+static inline void fire_alpha(int xc, int yc, unsigned color)
{
int oldmode = rb->lcd_get_drawmode();
@@ -1128,12 +1128,12 @@ static void move_fire(void)
/* Check for hit*/
for (i = FIRE_SPEED; i >= 0; i--) {
pix = get_pixel(fire_x, fire_y + i);
- if(pix == screen_white) {
+ if(!memcmp(&pix, &screen_white, sizeof(fb_data))) {
hit_white = true;
fire_y += i;
break;
}
- if(pix == screen_green) {
+ if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
hit_green = true;
fire_y += i;
break;
@@ -1336,7 +1336,8 @@ static void move_bombs(void)
/* Check for green (ship or shield) */
for (j = BOMB_HEIGHT; j >= BOMB_HEIGHT - BOMB_SPEED; j--) {
bombs[i].target = 0;
- if(get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j) == screen_green) {
+ fb_data pix = get_pixel(bombs[i].x + BOMB_WIDTH / 2, bombs[i].y + j);
+ if(!memcmp(&pix, &screen_green, sizeof(fb_data))) {
/* Move to hit pixel */
bombs[i].x += BOMB_WIDTH / 2;
bombs[i].y += j;