diff --git a/src/c/main.c b/src/c/main.c index 3793c24..4b6e804 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -213,8 +213,8 @@ static void update_minute_30_out_handler(Animation *animation, bool finished, vo s_butt = gbitmap_create_with_resource(s_random_butts[s_butt_index]); // swap colors - replace_gbitmap_color(GColorGreen, s_random_color_next, s_butt, NULL); - replace_gbitmap_color(s_random_color_current, s_random_color_next, s_head, NULL); + replace_gbitmap_color(GColorGreen, s_random_color_next, s_butt); + replace_gbitmap_color(s_random_color_current, s_random_color_next, s_head); s_random_color_current = s_random_color_next; s_random_color_next = s_dark_bg_colors[rand() % s_color_count]; @@ -230,8 +230,8 @@ static void update_minute_60_out_handler(Animation *animation, bool finished, vo s_head = gbitmap_create_with_resource(s_random_heads[s_head_index]); // swap colors - replace_gbitmap_color(GColorGreen, s_random_color_next, s_head, NULL); - replace_gbitmap_color(s_random_color_current, s_random_color_next, s_butt, NULL); + replace_gbitmap_color(GColorGreen, s_random_color_next, s_head); + replace_gbitmap_color(s_random_color_current, s_random_color_next, s_butt); s_random_color_current = s_random_color_next; s_random_color_next = s_dark_bg_colors[rand() % s_color_count]; @@ -397,8 +397,8 @@ static void init() { // set starting colors s_random_color_next = s_dark_bg_colors[rand() % s_color_count]; - replace_gbitmap_color(GColorGreen, s_random_color_current, s_head, NULL); - replace_gbitmap_color(GColorGreen, s_random_color_current, s_butt, NULL); + replace_gbitmap_color(GColorGreen, s_random_color_current, s_head); + replace_gbitmap_color(GColorGreen, s_random_color_current, s_butt); // load custom font #if PBL_DISPLAY_WIDTH <= 180 diff --git a/src/c/palette_manip.c b/src/c/palette_manip.c index 09963e7..1307e34 100644 --- a/src/c/palette_manip.c +++ b/src/c/palette_manip.c @@ -2,8 +2,6 @@ #include "palette_manip.h" -#ifdef PBL_COLOR - int get_num_palette_colors(GBitmap *b){ GBitmapFormat format = gbitmap_get_format(b); switch (format) { @@ -16,7 +14,7 @@ int get_num_palette_colors(GBitmap *b){ } } -void replace_gbitmap_color(GColor color_to_replace, GColor replace_with_color, GBitmap *im, BitmapLayer *bml){ +void replace_gbitmap_color(GColor color_to_replace, GColor replace_with_color, GBitmap *im){ //First determine what the number of colors in the palette int num_palette_items = get_num_palette_colors(im); @@ -30,12 +28,4 @@ void replace_gbitmap_color(GColor color_to_replace, GColor replace_with_color, G current_palette[i].argb = (current_palette[i].argb & 0xC0)| (replace_with_color.argb & 0x3F); } } - - //Mark the bitmaplayer dirty - if(bml != NULL){ - layer_mark_dirty(bitmap_layer_get_layer(bml)); - } - -} - -#endif \ No newline at end of file +} \ No newline at end of file diff --git a/src/c/palette_manip.h b/src/c/palette_manip.h index 50d48f3..0ce2169 100644 --- a/src/c/palette_manip.h +++ b/src/c/palette_manip.h @@ -3,5 +3,5 @@ #include #ifdef PBL_COLOR -void replace_gbitmap_color(GColor color_to_replace, GColor replace_with_color, GBitmap *im, BitmapLayer *bml); +void replace_gbitmap_color(GColor color_to_replace, GColor replace_with_color, GBitmap *im); #endif \ No newline at end of file