Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/pebble-mario.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com>2015-12-26 03:24:16 +0300
committerAlexey 'Cluster' Avdyukhin <ClusterM@users.noreply.github.com>2015-12-26 03:24:16 +0300
commit4a066157c155b43eb58d741da5c14d8b036efb6a (patch)
treeef3084cc382e9293ea19c8d581521dab6c52d049
parent8ab676787229f38fc33243c13c450c7662d29c3c (diff)
Original Pebble hotfix (wtf, Pebble?)
-rw-r--r--appinfo.json30
-rw-r--r--resources/images/battery_charging~bw.pngbin0 -> 155 bytes
-rw-r--r--resources/images/battery_charging~color.pngbin0 -> 214 bytes
-rw-r--r--resources/images/no_phone~bw.pngbin0 -> 163 bytes
-rw-r--r--resources/images/no_phone~color.pngbin0 -> 229 bytes
-rw-r--r--resources/images/phone_battery_unknown~bw.pngbin0 -> 162 bytes
-rw-r--r--resources/images/phone_battery_unknown~color.pngbin0 -> 231 bytes
-rw-r--r--resources/images/phone_battery~bw.pngbin0 -> 145 bytes
-rw-r--r--resources/images/phone_battery~color.pngbin0 -> 212 bytes
-rw-r--r--resources/images/watch_battery~bw.pngbin0 -> 156 bytes
-rw-r--r--resources/images/watch_battery~color.pngbin0 -> 215 bytes
-rw-r--r--resources/images/weather_broken_clouds~bw.pngbin0 -> 130 bytes
-rw-r--r--resources/images/weather_broken_clouds~color.pngbin0 -> 216 bytes
-rw-r--r--resources/images/weather_clear_sky_day~bw.pngbin0 -> 121 bytes
-rw-r--r--resources/images/weather_clear_sky_day~color.pngbin0 -> 226 bytes
-rw-r--r--resources/images/weather_clear_sky_night~bw.pngbin0 -> 131 bytes
-rw-r--r--resources/images/weather_clear_sky_night~color.pngbin0 -> 206 bytes
-rw-r--r--resources/images/weather_few_clouds_day~bw.pngbin0 -> 145 bytes
-rw-r--r--resources/images/weather_few_clouds_day~color.pngbin0 -> 235 bytes
-rw-r--r--resources/images/weather_few_clouds_night~bw.pngbin0 -> 150 bytes
-rw-r--r--resources/images/weather_few_clouds_night~color.pngbin0 -> 215 bytes
-rw-r--r--resources/images/weather_mist~bw.pngbin0 -> 112 bytes
-rw-r--r--resources/images/weather_mist~color.pngbin0 -> 217 bytes
-rw-r--r--resources/images/weather_rain_day~bw.pngbin0 -> 148 bytes
-rw-r--r--resources/images/weather_rain_day~color.pngbin0 -> 238 bytes
-rw-r--r--resources/images/weather_rain_night~bw.pngbin0 -> 150 bytes
-rw-r--r--resources/images/weather_rain_night~color.pngbin0 -> 215 bytes
-rw-r--r--resources/images/weather_scattered_clouds~bw.pngbin0 -> 118 bytes
-rw-r--r--resources/images/weather_scattered_clouds~color.pngbin0 -> 222 bytes
-rw-r--r--resources/images/weather_shower_rain~bw.pngbin0 -> 126 bytes
-rw-r--r--resources/images/weather_shower_rain~color.pngbin0 -> 230 bytes
-rw-r--r--resources/images/weather_snow~bw.pngbin0 -> 127 bytes
-rw-r--r--resources/images/weather_snow~color.pngbin0 -> 213 bytes
-rw-r--r--resources/images/weather_thunderstorm~bw.pngbin0 -> 135 bytes
-rw-r--r--resources/images/weather_thunderstorm~color.pngbin0 -> 207 bytes
-rw-r--r--resources/images/weather_unknown~bw.pngbin0 -> 180 bytes
-rw-r--r--resources/images/weather_unknown~color.pngbin0 -> 259 bytes
-rw-r--r--src/pebble-mario.c15
38 files changed, 25 insertions, 20 deletions
diff --git a/appinfo.json b/appinfo.json
index a66dcb1..500a3fd 100644
--- a/appinfo.json
+++ b/appinfo.json
@@ -24,6 +24,12 @@
"resources": {
"media": [
{
+ "file": "images/watch_battery.png",
+ "name": "IMAGE_WATCH_BATTERY",
+ "targetPlatforms": null,
+ "type": "bitmap"
+ },
+ {
"file": "images/luigi-jump.png",
"name": "IMAGE_LUIGI_JUMP",
"targetPlatforms": [
@@ -57,46 +63,55 @@
{
"file": "images/weather_few_clouds_night.png",
"name": "IMAGE_WEATHER_FEW_CLOUDS_NIGHT",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_rain_night.png",
"name": "IMAGE_WEATHER_RAIN_NIGHT",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_clear_sky_night.png",
"name": "IMAGE_WEATHER_CLEAR_SKY_NIGHT",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_unknown.png",
"name": "IMAGE_WEATHER_UNKNOWN",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_thunderstorm.png",
"name": "IMAGE_WEATHER_THUNDERSTORM",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_snow.png",
"name": "IMAGE_WEATHER_SNOW",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_shower_rain.png",
"name": "IMAGE_WEATHER_SHOWER_RAIN",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_scattered_clouds.png",
"name": "IMAGE_WEATHER_SCATTERED_CLOUDS",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_rain_day.png",
"name": "IMAGE_WEATHER_RAIN_DAY",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
@@ -136,11 +151,6 @@
"type": "bitmap"
},
{
- "file": "images/watch_battery.png",
- "name": "IMAGE_WATCH_BATTERY",
- "type": "bitmap"
- },
- {
"file": "images/mario_bg_night.png",
"name": "IMAGE_BACKGROUND_NIGHT",
"targetPlatforms": [
@@ -153,41 +163,49 @@
{
"file": "images/weather_mist.png",
"name": "IMAGE_WEATHER_MIST",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_few_clouds_day.png",
"name": "IMAGE_WEATHER_FEW_CLOUDS_DAY",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_clear_sky_day.png",
"name": "IMAGE_WEATHER_CLEAR_SKY_DAY",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/weather_broken_clouds.png",
"name": "IMAGE_WEATHER_BROKEN_CLOUDS",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/phone_battery.png",
"name": "IMAGE_PHONE_BATTERY",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/no_phone.png",
"name": "IMAGE_NO_PHONE",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/battery_charging.png",
"name": "IMAGE_BATTERY_CHARGING",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
"file": "images/phone_battery_unknown.png",
"name": "IMAGE_PHONE_BATTERY_UNKNOWN",
+ "targetPlatforms": null,
"type": "bitmap"
},
{
@@ -217,7 +235,7 @@
"chalk"
],
"uuid": "43caa750-2896-4f46-94dc-1adbd4bc1ff3",
- "versionLabel": "3.31",
+ "versionLabel": "3.32",
"watchapp": {
"watchface": true
}
diff --git a/resources/images/battery_charging~bw.png b/resources/images/battery_charging~bw.png
new file mode 100644
index 0000000..3416605
--- /dev/null
+++ b/resources/images/battery_charging~bw.png
Binary files differ
diff --git a/resources/images/battery_charging~color.png b/resources/images/battery_charging~color.png
new file mode 100644
index 0000000..3c91e15
--- /dev/null
+++ b/resources/images/battery_charging~color.png
Binary files differ
diff --git a/resources/images/no_phone~bw.png b/resources/images/no_phone~bw.png
new file mode 100644
index 0000000..bc40747
--- /dev/null
+++ b/resources/images/no_phone~bw.png
Binary files differ
diff --git a/resources/images/no_phone~color.png b/resources/images/no_phone~color.png
new file mode 100644
index 0000000..5feb1a8
--- /dev/null
+++ b/resources/images/no_phone~color.png
Binary files differ
diff --git a/resources/images/phone_battery_unknown~bw.png b/resources/images/phone_battery_unknown~bw.png
new file mode 100644
index 0000000..877761f
--- /dev/null
+++ b/resources/images/phone_battery_unknown~bw.png
Binary files differ
diff --git a/resources/images/phone_battery_unknown~color.png b/resources/images/phone_battery_unknown~color.png
new file mode 100644
index 0000000..84b71ae
--- /dev/null
+++ b/resources/images/phone_battery_unknown~color.png
Binary files differ
diff --git a/resources/images/phone_battery~bw.png b/resources/images/phone_battery~bw.png
new file mode 100644
index 0000000..065e910
--- /dev/null
+++ b/resources/images/phone_battery~bw.png
Binary files differ
diff --git a/resources/images/phone_battery~color.png b/resources/images/phone_battery~color.png
new file mode 100644
index 0000000..31f7300
--- /dev/null
+++ b/resources/images/phone_battery~color.png
Binary files differ
diff --git a/resources/images/watch_battery~bw.png b/resources/images/watch_battery~bw.png
new file mode 100644
index 0000000..6438f3f
--- /dev/null
+++ b/resources/images/watch_battery~bw.png
Binary files differ
diff --git a/resources/images/watch_battery~color.png b/resources/images/watch_battery~color.png
new file mode 100644
index 0000000..bcdf0f9
--- /dev/null
+++ b/resources/images/watch_battery~color.png
Binary files differ
diff --git a/resources/images/weather_broken_clouds~bw.png b/resources/images/weather_broken_clouds~bw.png
new file mode 100644
index 0000000..20eecb2
--- /dev/null
+++ b/resources/images/weather_broken_clouds~bw.png
Binary files differ
diff --git a/resources/images/weather_broken_clouds~color.png b/resources/images/weather_broken_clouds~color.png
new file mode 100644
index 0000000..a0f0475
--- /dev/null
+++ b/resources/images/weather_broken_clouds~color.png
Binary files differ
diff --git a/resources/images/weather_clear_sky_day~bw.png b/resources/images/weather_clear_sky_day~bw.png
new file mode 100644
index 0000000..50e055a
--- /dev/null
+++ b/resources/images/weather_clear_sky_day~bw.png
Binary files differ
diff --git a/resources/images/weather_clear_sky_day~color.png b/resources/images/weather_clear_sky_day~color.png
new file mode 100644
index 0000000..d4750ae
--- /dev/null
+++ b/resources/images/weather_clear_sky_day~color.png
Binary files differ
diff --git a/resources/images/weather_clear_sky_night~bw.png b/resources/images/weather_clear_sky_night~bw.png
new file mode 100644
index 0000000..9538f0c
--- /dev/null
+++ b/resources/images/weather_clear_sky_night~bw.png
Binary files differ
diff --git a/resources/images/weather_clear_sky_night~color.png b/resources/images/weather_clear_sky_night~color.png
new file mode 100644
index 0000000..8d3e85f
--- /dev/null
+++ b/resources/images/weather_clear_sky_night~color.png
Binary files differ
diff --git a/resources/images/weather_few_clouds_day~bw.png b/resources/images/weather_few_clouds_day~bw.png
new file mode 100644
index 0000000..4dfd467
--- /dev/null
+++ b/resources/images/weather_few_clouds_day~bw.png
Binary files differ
diff --git a/resources/images/weather_few_clouds_day~color.png b/resources/images/weather_few_clouds_day~color.png
new file mode 100644
index 0000000..129170e
--- /dev/null
+++ b/resources/images/weather_few_clouds_day~color.png
Binary files differ
diff --git a/resources/images/weather_few_clouds_night~bw.png b/resources/images/weather_few_clouds_night~bw.png
new file mode 100644
index 0000000..cb2a358
--- /dev/null
+++ b/resources/images/weather_few_clouds_night~bw.png
Binary files differ
diff --git a/resources/images/weather_few_clouds_night~color.png b/resources/images/weather_few_clouds_night~color.png
new file mode 100644
index 0000000..fada714
--- /dev/null
+++ b/resources/images/weather_few_clouds_night~color.png
Binary files differ
diff --git a/resources/images/weather_mist~bw.png b/resources/images/weather_mist~bw.png
new file mode 100644
index 0000000..53e3d4f
--- /dev/null
+++ b/resources/images/weather_mist~bw.png
Binary files differ
diff --git a/resources/images/weather_mist~color.png b/resources/images/weather_mist~color.png
new file mode 100644
index 0000000..f7bf175
--- /dev/null
+++ b/resources/images/weather_mist~color.png
Binary files differ
diff --git a/resources/images/weather_rain_day~bw.png b/resources/images/weather_rain_day~bw.png
new file mode 100644
index 0000000..11338ea
--- /dev/null
+++ b/resources/images/weather_rain_day~bw.png
Binary files differ
diff --git a/resources/images/weather_rain_day~color.png b/resources/images/weather_rain_day~color.png
new file mode 100644
index 0000000..a4ee928
--- /dev/null
+++ b/resources/images/weather_rain_day~color.png
Binary files differ
diff --git a/resources/images/weather_rain_night~bw.png b/resources/images/weather_rain_night~bw.png
new file mode 100644
index 0000000..cb2a358
--- /dev/null
+++ b/resources/images/weather_rain_night~bw.png
Binary files differ
diff --git a/resources/images/weather_rain_night~color.png b/resources/images/weather_rain_night~color.png
new file mode 100644
index 0000000..fada714
--- /dev/null
+++ b/resources/images/weather_rain_night~color.png
Binary files differ
diff --git a/resources/images/weather_scattered_clouds~bw.png b/resources/images/weather_scattered_clouds~bw.png
new file mode 100644
index 0000000..b3ff733
--- /dev/null
+++ b/resources/images/weather_scattered_clouds~bw.png
Binary files differ
diff --git a/resources/images/weather_scattered_clouds~color.png b/resources/images/weather_scattered_clouds~color.png
new file mode 100644
index 0000000..3d7302e
--- /dev/null
+++ b/resources/images/weather_scattered_clouds~color.png
Binary files differ
diff --git a/resources/images/weather_shower_rain~bw.png b/resources/images/weather_shower_rain~bw.png
new file mode 100644
index 0000000..781a6b2
--- /dev/null
+++ b/resources/images/weather_shower_rain~bw.png
Binary files differ
diff --git a/resources/images/weather_shower_rain~color.png b/resources/images/weather_shower_rain~color.png
new file mode 100644
index 0000000..b30be7a
--- /dev/null
+++ b/resources/images/weather_shower_rain~color.png
Binary files differ
diff --git a/resources/images/weather_snow~bw.png b/resources/images/weather_snow~bw.png
new file mode 100644
index 0000000..c03cf8f
--- /dev/null
+++ b/resources/images/weather_snow~bw.png
Binary files differ
diff --git a/resources/images/weather_snow~color.png b/resources/images/weather_snow~color.png
new file mode 100644
index 0000000..2f4e292
--- /dev/null
+++ b/resources/images/weather_snow~color.png
Binary files differ
diff --git a/resources/images/weather_thunderstorm~bw.png b/resources/images/weather_thunderstorm~bw.png
new file mode 100644
index 0000000..f02ba13
--- /dev/null
+++ b/resources/images/weather_thunderstorm~bw.png
Binary files differ
diff --git a/resources/images/weather_thunderstorm~color.png b/resources/images/weather_thunderstorm~color.png
new file mode 100644
index 0000000..6b29cb6
--- /dev/null
+++ b/resources/images/weather_thunderstorm~color.png
Binary files differ
diff --git a/resources/images/weather_unknown~bw.png b/resources/images/weather_unknown~bw.png
new file mode 100644
index 0000000..6bcfdfc
--- /dev/null
+++ b/resources/images/weather_unknown~bw.png
Binary files differ
diff --git a/resources/images/weather_unknown~color.png b/resources/images/weather_unknown~color.png
new file mode 100644
index 0000000..90b1763
--- /dev/null
+++ b/resources/images/weather_unknown~color.png
Binary files differ
diff --git a/src/pebble-mario.c b/src/pebble-mario.c
index e9ec6ee..8bfe04e 100644
--- a/src/pebble-mario.c
+++ b/src/pebble-mario.c
@@ -260,11 +260,7 @@ void blocks_update_callback(Layer *layer, GContext *ctx)
BLOCK_SIZE,
layer_frame.size.h - 4);
-#if PBL_COLOR
graphics_context_set_compositing_mode(ctx, GCompOpSet);
-#else
- graphics_context_set_compositing_mode(ctx, GCompOpAssign);
-#endif
for (uint8_t i = 0; i < 2; ++i) {
GRect *rect = block_rect + i;
graphics_draw_bitmap_in_rect(ctx, block_bmp, *rect);
@@ -279,11 +275,7 @@ void mario_update_callback(Layer *layer, GContext *ctx)
bmp = mario_is_down ? mario_normal_bmp : mario_jump_bmp;
destination = GRect(0, 0, gbitmap_get_bounds(bmp).size.w, gbitmap_get_bounds(bmp).size.h);
-#if PBL_COLOR
graphics_context_set_compositing_mode(ctx, GCompOpSet);
-#else
- graphics_context_set_compositing_mode(ctx, GCompOpAnd);
-#endif
graphics_draw_bitmap_in_rect(ctx, bmp, destination);
}
@@ -351,12 +343,11 @@ void phone_battery_update_callback(Layer *layer, GContext *ctx)
#ifdef DEMO
phone_battery_level = 8;
#endif
-#if PBL_COLOR
graphics_context_set_compositing_mode(ctx, GCompOpSet);
+#if PBL_COLOR
graphics_context_set_fill_color(ctx, GColorWhite);
graphics_context_set_stroke_color(ctx, GColorWhite);
#else
- graphics_context_set_compositing_mode(ctx, GCompOpAssignInverted);
graphics_context_set_fill_color(ctx, GColorBlack);
graphics_context_set_stroke_color(ctx, GColorBlack);
#endif
@@ -435,11 +426,7 @@ void battery_update_callback(Layer *layer, GContext *ctx)
{
GRect image_rect = gbitmap_get_bounds(watch_bmp);
BatteryChargeState charge_state = battery_state_service_peek();
-#if PBL_COLOR
graphics_context_set_compositing_mode(ctx, GCompOpSet);
-#else
- graphics_context_set_compositing_mode(ctx, GCompOpAssignInverted);
-#endif
if (!charge_state.is_charging)
graphics_draw_bitmap_in_rect(ctx, watch_bmp, image_rect);
else