initial commit from CloudPebble
parent
8b54152f2f
commit
e66341b2ab
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"appKeys": {
|
||||
"btvibe": 8,
|
||||
"colorbg": 0,
|
||||
"colorh": 2,
|
||||
"colorm": 1,
|
||||
"colorp": 3,
|
||||
"colort": 6,
|
||||
"invert": 9,
|
||||
"rectticks": 7,
|
||||
"shadows": 4,
|
||||
"ticks": 5,
|
||||
"whwidth": 10
|
||||
},
|
||||
"capabilities": [
|
||||
"configurable"
|
||||
],
|
||||
"companyName": "lastfuture",
|
||||
"enableMultiJS": false,
|
||||
"longName": "LUTface",
|
||||
"projectType": "native",
|
||||
"resources": {
|
||||
"media": []
|
||||
},
|
||||
"sdkVersion": "3",
|
||||
"shortName": "LUTface",
|
||||
"targetPlatforms": [
|
||||
"basalt",
|
||||
"chalk"
|
||||
],
|
||||
"uuid": "58059a20-c8c1-4a51-b99b-f0663e97ace8",
|
||||
"versionLabel": "0.1",
|
||||
"watchapp": {
|
||||
"watchface": true
|
||||
}
|
||||
}
|
|
@ -0,0 +1,42 @@
|
|||
Pebble.addEventListener('ready', function() {
|
||||
console.log('PebbleKit JS ready!');
|
||||
});
|
||||
|
||||
Pebble.addEventListener('showConfiguration', function() {
|
||||
var watch;
|
||||
if(Pebble.getActiveWatchInfo) {
|
||||
watch = Pebble.getActiveWatchInfo();
|
||||
}
|
||||
var url='http://pebble.lastfuture.de/config/supersimple18/';
|
||||
if (watch.platform == "basalt") {
|
||||
url += "?rect=true";
|
||||
} else if (watch.platform == "aplite") {
|
||||
url += "?rect=true&bw=true";
|
||||
}
|
||||
console.log('Showing configuration page: '+url);
|
||||
Pebble.openURL(url);
|
||||
});
|
||||
|
||||
Pebble.addEventListener('webviewclosed', function(e) {
|
||||
var configData = JSON.parse(decodeURIComponent(e.response));
|
||||
console.log('Configuration page returned: '+JSON.stringify(configData));
|
||||
if (configData.colorbg) {
|
||||
Pebble.sendAppMessage({
|
||||
colorbg: parseInt(configData.colorbg, 16),
|
||||
colorm: parseInt(configData.colorm, 16),
|
||||
colorh: parseInt(configData.colorh, 16),
|
||||
colorp: parseInt(configData.colorp, 16),
|
||||
shadows: 0+(configData.shadows === 'true'),
|
||||
ticks: configData.ticks,
|
||||
colort: parseInt(configData.colort, 16),
|
||||
rectticks: 0+(configData.rectticks === 'true'),
|
||||
btvibe: 0+(configData.btvibe === 'true'),
|
||||
invert: 0+(configData.invert === 'true'),
|
||||
whwidth: configData.whwidth,
|
||||
}, function() {
|
||||
console.log('Send successful!');
|
||||
}, function() {
|
||||
console.log('Send failed!');
|
||||
});
|
||||
}
|
||||
});
|
|
@ -0,0 +1,304 @@
|
|||
#include <pebble.h>
|
||||
#include <surfacemap.c>
|
||||
#include <shading.c>
|
||||
|
||||
#define ANTIALIASING true
|
||||
|
||||
static uint8_t shadowtable[] = {192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, \
|
||||
192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, \
|
||||
192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, \
|
||||
192,192,192,192,192,192,192,192,192,192,192,192,192,192,192,192, \
|
||||
192,192,192,193,192,192,192,193,192,192,192,193,196,196,196,197, \
|
||||
192,192,192,193,192,192,192,193,192,192,192,193,196,196,196,197, \
|
||||
192,192,192,193,192,192,192,193,192,192,192,193,196,196,196,197, \
|
||||
208,208,208,209,208,208,208,209,208,208,208,209,212,212,212,213, \
|
||||
192,192,193,194,192,192,193,194,196,196,197,198,200,200,201,202, \
|
||||
192,192,193,194,192,192,193,194,196,196,197,198,200,200,201,202, \
|
||||
208,208,209,210,208,208,209,210,212,212,213,214,216,216,217,218, \
|
||||
224,224,225,226,224,224,225,226,228,228,229,230,232,232,233,234, \
|
||||
192,193,194,195,196,197,198,199,200,201,202,203,204,205,206,207, \
|
||||
208,209,210,211,212,213,214,215,216,217,218,219,220,221,222,223, \
|
||||
224,225,226,227,228,229,230,231,232,233,234,235,236,237,238,239, \
|
||||
240,241,242,243,244,245,246,247,248,249,250,251,252,253,254,255};
|
||||
|
||||
// alpha should only be 0b??111111 where ?? = 00 (full shade), 01 (much shade), 10 (some shade), 11 (none shade)
|
||||
static uint8_t alpha = 0b10111111;
|
||||
|
||||
typedef struct {
|
||||
int hours;
|
||||
int minutes;
|
||||
} Time;
|
||||
|
||||
static Window *s_main_window;
|
||||
static Layer *s_canvas_layer;
|
||||
|
||||
static GPoint s_center;
|
||||
static Time s_last_time;
|
||||
static int whwidth = 18;
|
||||
static bool debug = false;
|
||||
|
||||
/************************************ UI **************************************/
|
||||
|
||||
static void tick_handler(struct tm *tick_time, TimeUnits changed) {
|
||||
// Store time
|
||||
// dummy time in emulator
|
||||
if (debug) {
|
||||
s_last_time.hours = 0;
|
||||
s_last_time.minutes = tick_time->tm_sec;
|
||||
} else {
|
||||
s_last_time.hours = tick_time->tm_hour;
|
||||
s_last_time.hours -= (s_last_time.hours > 12) ? 12 : 0;
|
||||
s_last_time.minutes = tick_time->tm_min;
|
||||
}
|
||||
|
||||
// Redraw
|
||||
if(s_canvas_layer) {
|
||||
layer_mark_dirty(s_canvas_layer);
|
||||
}
|
||||
}
|
||||
|
||||
static int32_t get_angle_for_minute(int minute) {
|
||||
// Progress through 60 minutes, out of 360 degrees
|
||||
return ((minute * 360) / 60);
|
||||
}
|
||||
|
||||
static int32_t get_angle_for_hour(int hour, int minute) {
|
||||
// Progress through 12 hours, out of 360 degrees
|
||||
return (((hour * 360) / 12)+(get_angle_for_minute(minute)/12));
|
||||
}
|
||||
|
||||
static uint8_t un_heptet_x(uint16_t heptetindex) {
|
||||
uint16_t heptoffset = heptetindex / 8;
|
||||
uint8_t heptet = donutsurfacemapred[heptetindex-heptoffset];
|
||||
// actually don't even bother getting this right, it looks fine even without decoding the spread out heptet
|
||||
/*if (heptetindex%8 == 6) {
|
||||
heptet =
|
||||
(donutsurfacemapred[heptetindex-heptoffset-6]&0b00000001)<<6 |
|
||||
(donutsurfacemapred[heptetindex-heptoffset-5]&0b00000001)<<5 |
|
||||
(donutsurfacemapred[heptetindex-heptoffset-4]&0b00000001)<<4 |
|
||||
(donutsurfacemapred[heptetindex-heptoffset-3]&0b00000001)<<3 |
|
||||
(donutsurfacemapred[heptetindex-heptoffset-2]&0b00000001)<<2 |
|
||||
(donutsurfacemapred[heptetindex-heptoffset-1]&0b00000001)<<1 |
|
||||
(donutsurfacemapred[heptetindex-heptoffset]&0b00000001);
|
||||
} else {*/
|
||||
heptet = heptet >> 1;
|
||||
/*}*/
|
||||
return (heptet+16);
|
||||
}
|
||||
static uint8_t un_heptet_y(uint16_t heptetindex) {
|
||||
uint16_t heptoffset = heptetindex / 8;
|
||||
uint8_t heptet = donutsurfacemapgreen[heptetindex-heptoffset];
|
||||
heptet = heptet >> 1;
|
||||
return (127-heptet);
|
||||
}
|
||||
|
||||
static void update_proc(Layer *layer, GContext *ctx) {
|
||||
GColor bgcolor = GColorPurple;
|
||||
|
||||
GRect bounds = layer_get_bounds(layer);
|
||||
graphics_context_set_fill_color(ctx, GColorRajah);
|
||||
graphics_fill_rect(ctx, bounds, 0, GCornerNone);
|
||||
graphics_context_set_antialiased(ctx, ANTIALIASING);
|
||||
GRect bounds_h = bounds;
|
||||
bounds_h.size.h = bounds_h.size.w;
|
||||
bounds_h.origin.x -= (bounds_h.size.w-bounds.size.w)/2;
|
||||
|
||||
GRect bounds_mo = grect_inset(bounds_h, GEdgeInsets(19));
|
||||
GRect bounds_ho = grect_inset(bounds_h, GEdgeInsets(32));
|
||||
|
||||
// Adjust for minutes through the hour
|
||||
int32_t hour_deg = get_angle_for_hour(s_last_time.hours, s_last_time.minutes);
|
||||
int32_t minute_deg = get_angle_for_minute(s_last_time.minutes);
|
||||
|
||||
GPoint minute_hand_outer = gpoint_from_polar(bounds_mo, GOvalScaleModeFillCircle, DEG_TO_TRIGANGLE(minute_deg));
|
||||
GPoint hour_hand_outer = gpoint_from_polar(bounds_ho, GOvalScaleModeFillCircle, DEG_TO_TRIGANGLE(hour_deg));
|
||||
graphics_context_set_stroke_color(ctx, GColorWindsorTan);
|
||||
graphics_context_set_stroke_width(ctx, whwidth);
|
||||
graphics_draw_line(ctx, s_center, minute_hand_outer);
|
||||
graphics_context_set_stroke_color(ctx, GColorBulgarianRose);
|
||||
graphics_context_set_stroke_width(ctx, whwidth);
|
||||
graphics_draw_line(ctx, s_center, hour_hand_outer);
|
||||
graphics_context_set_fill_color(ctx, GColorWhite);
|
||||
graphics_fill_circle(ctx, s_center, whwidth/4);
|
||||
|
||||
GSize texturesize = GSize(127, 127);
|
||||
|
||||
GBitmap *texture = gbitmap_create_blank(texturesize, GBitmapFormat8Bit);
|
||||
uint8_t (*texture_matrix)[texturesize.w] = (uint8_t (*)[texturesize.w]) gbitmap_get_data(texture);
|
||||
GBitmap *fb = graphics_capture_frame_buffer_format(ctx, GBitmapFormat8Bit);
|
||||
uint8_t (*fb_matrix)[144] = (uint8_t (*)[144]) gbitmap_get_data(fb);
|
||||
|
||||
for(int y = 0; y < texturesize.h; y++) {
|
||||
for(int x = 0; x < texturesize.w; x++) {
|
||||
texture_matrix[y][x] = fb_matrix[y+20][x+8];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
GSize donutsurfacemapsize = GSize(125, 80);
|
||||
GSize donutshadowsize = GSize(122, 71);
|
||||
GSize donutspecularsize = GSize(74, 47);
|
||||
|
||||
for(int y = 0; y < bounds.size.h; y++) {
|
||||
for(int x = 0; x < bounds.size.w; x++) {
|
||||
fb_matrix[y][x] = bgcolor.argb;
|
||||
}
|
||||
}
|
||||
|
||||
for(int y = 0; y < donutsurfacemapsize.h; y++) {
|
||||
for(int x = 0; x < donutsurfacemapsize.w; x++) {
|
||||
uint16_t surfindex = x+(y*donutsurfacemapsize.w);
|
||||
uint8_t xpos = un_heptet_x(surfindex);
|
||||
uint8_t ypos = un_heptet_y(surfindex);
|
||||
if (xpos > 0 && ypos < 127) {
|
||||
fb_matrix[y+42][x+9] = texture_matrix[ypos][xpos];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int y = 0; y < donutspecularsize.h; y++) {
|
||||
for(int x = 0; x < donutspecularsize.w; x++) {
|
||||
uint16_t spec_index = x+(y*donutspecularsize.w);
|
||||
uint8_t spec_octet = donutspecular[spec_index/8];
|
||||
bool spec_white = 0;
|
||||
if ((x+y) % 2 == 0) {
|
||||
spec_white = 0;
|
||||
} else {
|
||||
switch (spec_index % 8) {
|
||||
case 0:
|
||||
spec_white = 0b10000000 & spec_octet;
|
||||
break;
|
||||
case 1:
|
||||
spec_white = 0b01000000 & spec_octet;
|
||||
break;
|
||||
case 2:
|
||||
spec_white = 0b00100000 & spec_octet;
|
||||
break;
|
||||
case 3:
|
||||
spec_white = 0b00010000 & spec_octet;
|
||||
break;
|
||||
case 4:
|
||||
spec_white = 0b00001000 & spec_octet;
|
||||
break;
|
||||
case 5:
|
||||
spec_white = 0b00000100 & spec_octet;
|
||||
break;
|
||||
case 6:
|
||||
spec_white = 0b00000010 & spec_octet;
|
||||
break;
|
||||
case 7:
|
||||
spec_white = 0b00000001 & spec_octet;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (spec_white) {
|
||||
GColor highlight = GColorIcterine;
|
||||
fb_matrix[y+50][x+40] = highlight.argb;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
for(int y = 0; y < donutshadowsize.h; y++) {
|
||||
for(int x = 0; x < donutshadowsize.w; x++) {
|
||||
uint16_t shad_index = x+(y*donutshadowsize.w);
|
||||
uint8_t shad_octet = donutshadow[shad_index/8];
|
||||
bool shad_dark = 0;
|
||||
if (fb_matrix[y+58][x+7] != bgcolor.argb && (x+y) % 2 == 0) {
|
||||
shad_dark = 0;
|
||||
} else {
|
||||
switch (shad_index % 8) {
|
||||
case 0:
|
||||
shad_dark = 0b10000000 & shad_octet;
|
||||
break;
|
||||
case 1:
|
||||
shad_dark = 0b01000000 & shad_octet;
|
||||
break;
|
||||
case 2:
|
||||
shad_dark = 0b00100000 & shad_octet;
|
||||
break;
|
||||
case 3:
|
||||
shad_dark = 0b00010000 & shad_octet;
|
||||
break;
|
||||
case 4:
|
||||
shad_dark = 0b00001000 & shad_octet;
|
||||
break;
|
||||
case 5:
|
||||
shad_dark = 0b00000100 & shad_octet;
|
||||
break;
|
||||
case 6:
|
||||
shad_dark = 0b00000010 & shad_octet;
|
||||
break;
|
||||
case 7:
|
||||
shad_dark = 0b00000001 & shad_octet;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (shad_dark) {
|
||||
fb_matrix[y+58][x+7] = shadowtable[alpha & fb_matrix[y+58][x+8]];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
graphics_release_frame_buffer(ctx, fb);
|
||||
gbitmap_destroy(texture);
|
||||
}
|
||||
|
||||
static void window_load(Window *window) {
|
||||
Layer *window_layer = window_get_root_layer(window);
|
||||
GRect window_bounds = layer_get_bounds(window_layer);
|
||||
|
||||
s_center = grect_center_point(&window_bounds);
|
||||
s_center.x -= 1;
|
||||
s_center.y -= 1;
|
||||
|
||||
s_canvas_layer = layer_create(window_bounds);
|
||||
layer_set_update_proc(s_canvas_layer, update_proc);
|
||||
layer_add_child(window_layer, s_canvas_layer);
|
||||
}
|
||||
|
||||
static void window_unload(Window *window) {
|
||||
layer_destroy(s_canvas_layer);
|
||||
}
|
||||
|
||||
/*********************************** App **************************************/
|
||||
|
||||
static void init() {
|
||||
srand(time(NULL));
|
||||
|
||||
time_t t = time(NULL);
|
||||
struct tm *time_now = localtime(&t);
|
||||
if (debug) {
|
||||
tick_handler(time_now, SECOND_UNIT);
|
||||
} else {
|
||||
tick_handler(time_now, MINUTE_UNIT);
|
||||
}
|
||||
|
||||
s_main_window = window_create();
|
||||
window_set_window_handlers(s_main_window, (WindowHandlers) {
|
||||
.load = window_load,
|
||||
.unload = window_unload,
|
||||
});
|
||||
window_stack_push(s_main_window, true);
|
||||
|
||||
if (debug) {
|
||||
tick_timer_service_subscribe(SECOND_UNIT, tick_handler);
|
||||
} else {
|
||||
tick_timer_service_subscribe(MINUTE_UNIT, tick_handler);
|
||||
}
|
||||
|
||||
if (debug) {
|
||||
light_enable(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void deinit() {
|
||||
window_destroy(s_main_window);
|
||||
}
|
||||
|
||||
int main() {
|
||||
init();
|
||||
app_event_loop();
|
||||
deinit();
|
||||
}
|
||||
|
|
@ -0,0 +1,137 @@
|
|||
#include <pebble.h>
|
||||
// 435 bytes 3480 bits
|
||||
// black and white image data wrapped in bitmaps
|
||||
static uint8_t donutspecular[] = {
|
||||
0b00000000,0b00000000,0b00111111,0b11111000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,
|
||||
0b11111111,0b10000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00011111,0b11111111,0b11111111,0b11110000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00111111,0b11111111,0b11111111,0b11111100,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00111111,0b11111111,0b11111111,0b11111111,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00011111,0b11111111,
|
||||
0b11111111,0b11111111,0b10000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00001111,0b11111111,0b11111111,0b11111111,0b10000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,0b11111000,0b00111100,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b11111111,0b11111000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00111111,
|
||||
0b11111000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000111,0b11111000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b11100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b11111100,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b11111111,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000001,0b11111111,0b11000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,
|
||||
0b11111111,0b11110000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b11111111,0b11111100,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000001,0b11111111,0b11111111,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,
|
||||
0b11111111,0b11111111,0b11000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,0b11111111,0b11100000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000111,0b11111111,0b11111111,0b11110000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00001111,0b11111111,0b11111111,0b11110000,0b00000000,0b00000000,0b00000000,0b00011111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111000,0b00000000,0b00000000,0b00011111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111000,
|
||||
0b00000000,0b00000000,0b01111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111000,0b00000000,0b00000000,0b01111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11110000,0b00000000,0b00000000,0b00011111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11100000,0b00000000,0b00000000,0b00000011,0b11111111,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b01111111,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000111,0b11111111,0b11111111,0b11111100,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00111111,0b11111111,
|
||||
0b11110000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00111110,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,
|
||||
};
|
||||
// 1083 bytes 8664 bits
|
||||
// black and white image data wrapped in bitmaps
|
||||
static uint8_t donutshadow[] = {
|
||||
0b00000000,0b00000100,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000010,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b10000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b01000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000100,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000010,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b10000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b01000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00010000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00001000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000010,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b10000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b11111111,0b11111111,0b11111111,0b10000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b01100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,0b11111111,0b11111111,0b11111110,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00011000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b00000000,0b00000000,0b00000000,0b00000000,0b00001110,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000111,0b11111111,0b11111111,0b11111111,0b11111111,0b10000000,0b00000000,0b00000000,0b00000000,0b00000011,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000111,0b11111111,0b11111111,0b11111111,0b11111111,0b10000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b11000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00111000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00001110,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000001,0b11111111,0b11111111,0b11111111,0b11111000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,
|
||||
0b10000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,0b11111111,0b11000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000001,0b11100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b01111000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00011110,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000111,0b11000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b11110000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00111110,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00001111,0b10000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000011,0b11110000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b11111100,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b01111111,0b10000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00111111,
|
||||
0b11110000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00001111,0b11111100,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,0b10000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b11111111,0b11110000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b01111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00011111,0b11111111,0b11000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00001111,0b11111111,0b11111000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000110,0b11111111,0b11111111,
|
||||
0b10000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000011,0b11111111,0b11111111,0b11110000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000001,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b11111011,0b11111111,0b11111111,0b11100000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b11111100,0b01111111,
|
||||
0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b11111111,0b10111111,0b11111111,0b11111111,0b11100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b11111111,0b10000111,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b11111111,0b11100000,0b11111111,0b11111111,0b11111111,
|
||||
0b11100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b11111111,0b11111000,
|
||||
0b00111111,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00001111,0b11111111,0b11111000,0b00000111,0b11111111,0b11111111,0b11111111,0b11110000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00011111,0b11111111,0b11111100,0b00000001,0b11111111,0b11111111,0b11111111,0b11111111,0b11000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b01111111,0b11111111,0b11111110,0b00000000,0b00111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000001,0b11111111,0b11111111,0b11111111,
|
||||
0b10000000,0b00000111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b00000000,0b00000000,0b00000000,0b00000000,0b01111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11000000,0b00000001,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11000000,0b00000000,0b00011111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11100000,0b00000000,0b00000111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11110000,0b00000000,0b00000000,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111100,0b00000000,0b00000000,0b00001111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111100,0b00000000,0b00000000,0b00000001,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111100,0b00000000,0b00000000,
|
||||
0b00000000,0b00111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111100,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111100,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000011,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111100,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00011111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11100000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000001,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11100000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,0b11111111,
|
||||
0b10000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00001111,0b11111111,0b11111111,
|
||||
0b11111111,0b11111111,0b11111110,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00101111,0b11111111,0b11111111,0b11111111,0b11000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,0b00000000,0b00000000,0b00111010,0b11101111,0b01111100,0b00000000,0b00000000,0b00000000,0b00000000,
|
||||
0b00000000,0b00000000,0b00000000,
|
||||
};
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,62 @@
|
|||
|
||||
#
|
||||
# This file is the default set of rules to compile a Pebble project.
|
||||
#
|
||||
# Feel free to customize this to your needs.
|
||||
#
|
||||
|
||||
import os.path
|
||||
try:
|
||||
from sh import CommandNotFound, jshint, cat, ErrorReturnCode_2
|
||||
hint = jshint
|
||||
except (ImportError, CommandNotFound):
|
||||
hint = None
|
||||
|
||||
top = '.'
|
||||
out = 'build'
|
||||
|
||||
def options(ctx):
|
||||
ctx.load('pebble_sdk')
|
||||
|
||||
def configure(ctx):
|
||||
ctx.load('pebble_sdk')
|
||||
|
||||
def build(ctx):
|
||||
if False and hint is not None:
|
||||
try:
|
||||
hint([node.abspath() for node in ctx.path.ant_glob("src/**/*.js")], _tty_out=False) # no tty because there are none in the cloudpebble sandbox.
|
||||
except ErrorReturnCode_2 as e:
|
||||
ctx.fatal("\nJavaScript linting failed (you can disable this in Project Settings):\n" + e.stdout)
|
||||
|
||||
# Concatenate all our JS files (but not recursively), and only if any JS exists in the first place.
|
||||
ctx.path.make_node('src/js/').mkdir()
|
||||
js_paths = ctx.path.ant_glob(['src/*.js', 'src/**/*.js'])
|
||||
if js_paths:
|
||||
ctx(rule='cat ${SRC} > ${TGT}', source=js_paths, target='pebble-js-app.js')
|
||||
has_js = True
|
||||
else:
|
||||
has_js = False
|
||||
|
||||
ctx.load('pebble_sdk')
|
||||
|
||||
build_worker = os.path.exists('worker_src')
|
||||
binaries = []
|
||||
|
||||
for p in ctx.env.TARGET_PLATFORMS:
|
||||
ctx.set_env(ctx.all_envs[p])
|
||||
ctx.set_group(ctx.env.PLATFORM_NAME)
|
||||
app_elf='{}/pebble-app.elf'.format(p)
|
||||
ctx.pbl_program(source=ctx.path.ant_glob('src/**/*.c'),
|
||||
target=app_elf)
|
||||
|
||||
if build_worker:
|
||||
worker_elf='{}/pebble-worker.elf'.format(p)
|
||||
binaries.append({'platform': p, 'app_elf': app_elf, 'worker_elf': worker_elf})
|
||||
ctx.pbl_worker(source=ctx.path.ant_glob('worker_src/**/*.c'),
|
||||
target=worker_elf)
|
||||
else:
|
||||
binaries.append({'platform': p, 'app_elf': app_elf})
|
||||
|
||||
ctx.set_group('bundle')
|
||||
ctx.pbl_bundle(binaries=binaries, js='pebble-js-app.js' if has_js else [])
|
||||
|
Loading…
Reference in New Issue