Remove unused palette manipulator feature
This commit is contained in:
+6
-6
@@ -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
|
||||
|
||||
+1
-11
@@ -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
|
||||
@@ -3,5 +3,5 @@
|
||||
#include <pebble.h>
|
||||
|
||||
#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
|
||||
Reference in New Issue
Block a user