6 Commits
11 changed files with 19 additions and 134 deletions
+4 -2
View File
@@ -1,3 +1,5 @@
/.clangd
/build
/.lock*
/.clangd
/.lock-waf*
/package-lock.json
/node_modules
+1 -1
View File
@@ -1,6 +1,6 @@
MIT License
Copyright (c) 2026 hilariouspig
Copyright (c) 2026 RandyTheSilly
THIS LICENSE DOES NOT APPLY TO ANY ".png" NOR ".ttf" FILES IN THIS REPOSITORY.
-7
View File
@@ -20,10 +20,3 @@ Since the original watchface is **NOT** open source, this "port" could be more a
- Add more Maan art (see [this gallery](https://www.flickr.com/photos/53297919@N04/albums/72157624708812279) for potential candidates)
- Potential light mode (don't hold your breath - I'm still not sure this would look good and I don't like the idea of having settings)
- Black&white support if I get bored or Pebble releases a modern b&w watch (Flint doesn't count)
# Development
1. Install the [Pebble SDK](https://developer.repebble.com/sdk/)
2. Clone this repo
3. `pebble build` (some headers needed to satisfy your IDE are generated on first build)
4. If using `clangd`, run `./tools/clangd.zsh` to generate a `.clangd` file to fix various error notifications
5. Hack away and test with `pebble build && pebble install --emulator emery`
-46
View File
@@ -1,46 +0,0 @@
/*
* Example jshint configuration file for Pebble development.
*
* Check out the full documentation at http://www.jshint.com/docs/options/
*/
{
// Declares the existence of the globals available in PebbleKit JS.
"globals": {"console": true, "setTimeout": true, "setInterval": true, "Int8Array": true, "Uint8Array": true, "Uint8ClampedArray": true, "Int16Array": true, "Uint16Array": true, "Int32Array": true, "Uint32Array": true, "Float32Array": true, "Float64Array": true, "Pebble": true, "WebSocket": true, "XMLHttpRequest": true, "navigator": true, "localStorage": true, "require": true, "exports": true, "module": true},
// Do not mess with standard JavaScript objects (Array, Date, etc)
"freeze": true,
// Do not use eval! Keep this warning turned on (ie: false)
"evil": false,
/*
* The options below are more style/developer dependent.
* Customize to your liking.
*/
// All variables should be in camelcase - too specific for CloudPebble builds to fail
// "camelcase": true,
// Do not allow blocks without { } - too specific for CloudPebble builds to fail.
// "curly": true,
// Prohibits the use of immediate function invocations without wrapping them in parentheses
"immed": true,
// Don't enforce indentation, because it's not worth failing builds over
// (especially given our somewhat lacklustre support for it)
"indent": false,
// Do not use a variable before it's defined
"latedef": "nofunc",
// Spot undefined variables
"undef": "true",
// Spot unused variables
"unused": "true",
// Enable ES6 syntax (const, let, arrow functions, etc)
"esversion": 6
}
+5 -1
View File
@@ -1,7 +1,11 @@
{
"author": "RandyTheSilly",
"dependencies": {},
"keywords": [],
"keywords": [
"silly",
"creature",
"swap"
],
"name": "maan-on-my-wrist-xl",
"pebble": {
"displayName": "Maan On My Wrist XL",
+6 -6
View File
@@ -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
+2 -12
View File
@@ -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
}
+1 -1
View File
@@ -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
-18
View File
@@ -1,18 +0,0 @@
#!/usr/bin/env zsh
echo "CompileFlags:
Add:
[
-DPBL_DISPLAY_WIDTH=200,
-DPBL_DISPLAY_HEIGHT=228,
-xc,
-nostdinc,
-DPBL_COLOR,
-I${HOME}/.pebble-sdk/SDKs/current/sdk-core/pebble/emery/include,
-include/home/cuan/gitrepos/Maan-On-My-Wrist-XL/build/include/message_keys.auto.h,
-I$(pwd)/build/emery,
-include${HOME}/.pebble-sdk/SDKs/current/toolchain/arm-none-eabi/arm-none-eabi/include/stdint.h,
-include${HOME}/.pebble-sdk/SDKs/current/toolchain/arm-none-eabi/arm-none-eabi/include/stdlib.h,
-include${HOME}/.pebble-sdk/SDKs/current/toolchain/arm-none-eabi/arm-none-eabi/include/time.h,
-include${HOME}/.pebble-sdk/SDKs/current/toolchain/arm-none-eabi/lib/gcc/arm-none-eabi/14.2.1/include/stddef.h,
-include${HOME}/.pebble-sdk/SDKs/current/toolchain/arm-none-eabi/lib/gcc/arm-none-eabi/14.2.1/include/stdbool.h,
]" > ./.clangd
-33
View File
@@ -1,33 +0,0 @@
#!/usr/bin/env zsh
# THIS IS A LEGACY TOOL THAT WAS USED FOR THE INITIAL
# ASSET EXTRACTION - ASSETS HAVE SINCE BEEN HEAVILY
# MODIFIED, MAKING THIS SCRIPT PRETTY USELESS
if [[ $# -lt 2 ]]; then
echo "Usage: $0 <dir> <half (top/bottom)>"
exit 1
fi
if [[ $2 == "top" ]]; then
gravity="South"
elif [[ $2 == "bottom" ]]; then
gravity="North"
else
echo "Usage: $0 <dir> <half (top/bottom)>"
exit 1
fi
for file in $1/*; do
magick "$file" -gravity $gravity -chop 0x10 "$file"
magick "$file" -transparent Black PNG24:"$file"
magick "$file" -fill "rgb(0,255,0)" -opaque White "$file"
magick "$file" -gravity Center -background None -compose Copy -extent 260x $file
# Bar is commented out for an experiment with rendering in real time on the watch
#magick "$file" -gravity $gravity -background White -splice 0x15 $file
if [[ $2 == "top" ]]; then
magick "$file" -gravity North -background None -splice 0x41 $file
else
magick "$file" -gravity South -background None -splice 0x41 $file
fi
done
-7
View File
@@ -1,7 +0,0 @@
#!/usr/bin/env zsh
# ALWAYS USE ZOPFLI TO CRUSH PNGS AS MUCH AS POSSIBLE BEFORE SHIPPING
for file in **/*; do
zopflipng -y --iterations=500 --filters=01234mepb --lossy_8bit --lossy_transparent $file $file &
done