From 2308cc834e374acb08c1bf7b75912578202b30d7 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Thu, 30 Jul 2026 19:32:30 -0400 Subject: [PATCH] Drastic rebranding... lol --- README.md | 20 ++--- package.json | 22 ++++-- resources-base/ATTRIBUTION.md | 7 +- resources-base/clock.svg | 144 ++++++++++++++++++++++++++++++++++ resources-base/clock50x50.svg | 13 --- resources-base/leaf.svg | 37 --------- resources/check.png | Bin 333 -> 0 bytes resources/check~color.png | Bin 0 -> 974 bytes resources/clock.png | Bin 624 -> 0 bytes resources/clock25~color.png | Bin 0 -> 787 bytes resources/clock35~color.png | Bin 0 -> 1096 bytes resources/leaf~200w.png | Bin 952 -> 0 bytes resources/leaf~260w.png | Bin 1214 -> 0 bytes src/c/main.c | 47 ++++++----- 14 files changed, 195 insertions(+), 95 deletions(-) create mode 100644 resources-base/clock.svg delete mode 100644 resources-base/clock50x50.svg delete mode 100644 resources-base/leaf.svg delete mode 100644 resources/check.png create mode 100644 resources/check~color.png delete mode 100644 resources/clock.png create mode 100644 resources/clock25~color.png create mode 100644 resources/clock35~color.png delete mode 100644 resources/leaf~200w.png delete mode 100644 resources/leaf~260w.png diff --git a/README.md b/README.md index a8e71b3..11b7f85 100644 --- a/README.md +++ b/README.md @@ -1,21 +1,11 @@ -# Stoner Alarm -An alarm designed to reliably wake a snoozing stoner. Seize the day (or at least don't get fired)! +# Trigalarm +A habit-correcting alarm for heavy sleepers. Cannot be shut off until you solve a triangle. ## The Pitch ### Simple The app only has one page. You can only set one alarm. There is no snooze, there is no weekly schedule, and there is no way to disable the alarm (you'll always have one set - every day - like it or not). ### Persistent -The alarm cannot be stopped until the drowsy stoner completes a thematically appropriate, touch-based game. Play well enough and quickly enough to prove you're awake and defuse the alarm. -#### "What if I just force-close the app in my sleep?" -Then it will schedule itself to re-open ASAP :) -### The Game -The alarm-defusing game requires you to serve some customers at an illegal flower bar. There are three stages, with each stage having its own meter to fill before progressing to the next. -#### The Stages -1. Grind the flower - - Quickly move your finger in a circle to utilize the grinder -2. Fill the bowls - - Drag the ground flower into each bowl -3. Light the bowls - - Swipe in the prompted direction with good reaction time to use the lighter +The alarm cannot be stopped until you solve a randomized triangle. Even if you force-close the app, it will re-open itself until you solve the triangle. -For all stages, be sure to watch for cops! Don't move a muscle when they're looking. +## Why Trigonometry? +Because it requires the perfect amount of thought to activate your brain in the morning. If the app gave you a more typical math problem, you could just mindlessly punch it into a calculator. Trigonometry still requires a base amount of thought ("Do I need sine, cosine, or tangent?") before a calculator is of any use. diff --git a/package.json b/package.json index a99f112..7c32d4a 100644 --- a/package.json +++ b/package.json @@ -1,12 +1,12 @@ { - "name": "stoner-alarm", + "name": "trigalarm", "author": "RandyTheSilly", "version": "1.0.0", - "keywords": ["alarm"], + "keywords": ["alarm", "math", "trigonometry", "trig", "triangle"], "private": true, "dependencies": {}, "pebble": { - "displayName": "Stoner Alarm", + "displayName": "Trigalarm", "uuid": "293cd38c-4e8c-46ae-a3dc-c789d7ce93ab", "sdkVersion": "3", "enableMultiJS": true, @@ -22,16 +22,24 @@ "resources": { "media": [ { - "file": "leaf.png", + "file": "clock25.png", "memoryFormat": "Smallest", - "name": "LEAF", + "name": "CLOCK25", + "spaceOptimization": "storage", + "type": "bitmap", + "menuIcon": true + }, + { + "file": "clock35.png", + "memoryFormat": "Smallest", + "name": "CLOCK35", "spaceOptimization": "storage", "type": "bitmap" }, { - "file": "clock.png", + "file": "check.png", "memoryFormat": "Smallest", - "name": "CLOCK", + "name": "CHECK", "spaceOptimization": "storage", "type": "bitmap" } diff --git a/resources-base/ATTRIBUTION.md b/resources-base/ATTRIBUTION.md index cb308d2..ebfbf89 100644 --- a/resources-base/ATTRIBUTION.md +++ b/resources-base/ATTRIBUTION.md @@ -1,8 +1,5 @@ -# Leaf Icon -[marijuana leaf by Rachel Fredericks](https://thenounproject.com/icon/marijuana-leaf-6959339/) (CC BY 3.0) - # Check Icon -[checkmark by Asmuh](https://thenounproject.com/icon/checkmark-2193586/) (CC BY 3.0) +Modified version of [checkmark by Asmuh](https://thenounproject.com/icon/checkmark-2193586/) (CC BY 3.0) # Clock Icon -[pebble-dev/iconography](https://raw.githubusercontent.com/pebble-dev/iconography/refs/heads/master/pebbleos/Pebble_50x50_Alarm_clock.svg) +Modified version of [pebble-dev/iconography](https://raw.githubusercontent.com/pebble-dev/iconography/refs/heads/master/pebbleos/Pebble_50x50_Alarm_clock.svg) diff --git a/resources-base/clock.svg b/resources-base/clock.svg new file mode 100644 index 0000000..24e8741 --- /dev/null +++ b/resources-base/clock.svg @@ -0,0 +1,144 @@ + + + + + + + + + + + + diff --git a/resources-base/clock50x50.svg b/resources-base/clock50x50.svg deleted file mode 100644 index 53e7e2b..0000000 --- a/resources-base/clock50x50.svg +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - diff --git a/resources-base/leaf.svg b/resources-base/leaf.svg deleted file mode 100644 index 6f17415..0000000 --- a/resources-base/leaf.svg +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - diff --git a/resources/check.png b/resources/check.png deleted file mode 100644 index 583fd76755885bb6a6562a68f1d0503d56640d9d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 333 zcmV-T0kZyyP)X1ONa4`Ud100003LNkl#gO@an+`U=7cwE=yKZ^Yw*2CX2F%PNB7l)8laxziP=uc7rb z>b1fQKZv6J3M^YQFwZaIaYBvY1JjXNZfFyjjkKQz&q!c8vd?Q4_(MDnsS=`C_bm3} zeXN(}vroAY#(wL{o~;YkXH|A76Kwp-5O1b#U?(ic4y8hTtd!~4wsj@c)XO7IFA-7= fpdn%u2+8mdil*aJd?F%400000NkvXXu0mjf`3aKC diff --git a/resources/check~color.png b/resources/check~color.png new file mode 100644 index 0000000000000000000000000000000000000000..17a0475e5047912c8d2016ed325f8a6ffd30f760 GIT binary patch literal 974 zcmV;<12O!GP)<806$E8xXKQ(RSuVS~yDBX$wOjttLzQcX4}x-YbG5d%CY!yzJ@Hh% z1y3KMTsQm>l%Jokjg1Z2_~leLhqN&`T4o(>+5Z~ zCwLTb%#cz%g&?fpWpi?JqMDi-TW$nN5eGGS4gWyKZ^*l+SR%fH zoXW~d9UdOa=IH21RaI5?9$zCd;!#K5z%vL+N=mW|Y~s~B%6$hp)z#HHK0cPs!NGwl zDk|*SU%0ix79>?Tf}oU?6irS}YG7c%F7!7_Ou0w+9&&1HYjt{hDjT+1Y`I%m2ljn1Y;^mKI%KU(04|YfFWNh4zP_H)1hU@OSTfH!?D!a2X#TS8{T)y@{Om z_V&!Y*trSm6Ma>Eq9I9Xv*0!Q-D7pr?0P1 z;j*%_qSn^d(31`ZgR)s#T2fY4mbcs`nxZWiZcyi76>@red(9KNJBy2p%FN94mirHH zM_(@TQJ0Nn$m#0p((Uc7?#t}#tQb??awm8keKA|mAQ_m4oX*Zp_mzgt^z^h+Q&YX= zp5v_-FJ}uHBo)6vPIGg!uCA_RGchq?N6<68?$(M)L4l;;XUJ)4YSQK9rCdfwN9_>b zN4Z-gW(Cbz`vh|8>gsfMcBbLs;fTjzYzrDB31g5`TwH7i_7)1o^$%Il{!)DdS@u^f wE(IO(CFHS=SL}6hDd><-ae-fv6N_Tb|7TV4Mso~*zW@LL07*qoM6N<$f_#M4zyJUM literal 0 HcmV?d00001 diff --git a/resources/clock.png b/resources/clock.png deleted file mode 100644 index ef0ec96eecd8caf23e5a9fcb38913a57baeefa06..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 624 zcmV-$0+0QPP)nVFfH^kT>?uUqDN5f@cv@?ONNGJ`6!jVg1)^wr(K$^7Qs2jzRzgPH$j z!b!mstf8Alk{>Lhn{_-9z7ND+MC7$>;x$BM?_{Qk=;kpInwZbRl9*4E2#?V{H8V9a z!1p5j!Vp#v!~8A64-Al)h`?j)OvFzj{K+t4h0LEKd_#X?o-`rZL_SkWeC|=t7Kcau zyp)N=gtqw1ilY)S}=BT*d^n8gWUIU;sxT@dXO5m_FPqjf`$-a>9H%NPkTV?fpo<`=M!?=kamM!pAxLDNsIoNOJ{1WBCo-et zS6Zy7Q4$f6`xwMrCJ-{j{l!QdVlER1k=9~lcB;|DWD+BY$gE;y3nKme#ZY4MI_)(2 z5ZPRSa3B4MY_9%bnld^tzEy}V!mOH(*t0{cBqaQte_0T-8jw)X{A-U;=>g%M@MGQu zP6{?7($75+d6Z#9W=L(p3`B-`G$29;m)OpeH6u^5olA72Z@3Js7;0MkgFw^(0000< KMNUMnLSTY0G8bL| diff --git a/resources/clock25~color.png b/resources/clock25~color.png new file mode 100644 index 0000000000000000000000000000000000000000..12e3f5695aa2754a604a24ba18803fc85833133e GIT binary patch literal 787 zcmV+u1MK{XP)X1^@s6HR9gx0008oNklzjg8v2+n}~>+qT=Nwr$(Cz0)_zZnC-jl)Fhjhlly@ZWdku+#>o{ zI4hhH{`RP+h=I2-UYKXaQoX&sUkcDXmspCGUnGoSuR~*PI#YmfT*v%{LjopDn1Hck z$1+Iv3x2xhw2n=+&28hcy5PEytYZTN)TvVklu`;cYSb|1{d7&Da7D)^!!{O;)`=Tt znxX=k_P3Oj6!q@iI~cuv`xZ$_NlJ2Gr6$)bmvBpaOk|82DnKXFtQqVSuzvk|P)n99 z!SdzHL9JS~3c6>zRi7c;(eZ%{TodjxVHMR8P@zHv7^SDDBRe}AMwKd6GUnB-zAWLs zaEbrK36WOPU#5A}-``)|ym=Ewsi~>R%*=$*ty{Oi8mYa(9;-i6h;_7QI|=CAxictd z##HTqea>E2#=QlM961t{J7a42@ZoGE zJ)9koP<}ZkCPsbu@WEr__wU~$Iyzc$ruL|9<6Z(rj2Hn&N=QgRa&j^pY3R_QG$7q< zW3v+;M@2Gtj0pa(B4dQyb~c)8fRaNz=I z>gVT&wQJYH6IHERm5wBj#{KO(!D!2tE#MNYT)7gSinG$jy=i!8K zqeqVhUk}2+8Dp+x%a*88r3!o4OAo_F8ixu!h1UW~$V;Jz5Ms7lfuMvVLW=N@P)?{P zwAFMa*8j}0<{#a2LVFb2`*^AVp&|b-4x*;^(`15E^sOII0^>mas7~Pje*hl*=~>Yp RN>Ts-002ovPDHLkV1iUPd@29{ literal 0 HcmV?d00001 diff --git a/resources/clock35~color.png b/resources/clock35~color.png new file mode 100644 index 0000000000000000000000000000000000000000..46e3d5fad4869f36200caa6779fc09ffab01a0c9 GIT binary patch literal 1096 zcmV-O1h@N%P)sFmhv{_PXfj7q_w5(Ofn>^diMLR;gpvgCzv>KV%S-il$4-Nn>J$Dt5+{j(a!z^@!GNjuAtNILk@WoY&+FMQv4ww4(7ShU)YsR;rpn4nQPuOTn|cpk`8UyumSod zbJkpwUw{2I%FD}<3ei{mc_W(eQ^fT)fx+YPVA!x>Shj4L>@{DdxcAGngopSmrxY2;hUb^K_kRKKsP zk`z>>e9Or++x5CvbyyiFYefc-46>N44zS09sar%c0{vPAd^RZWt+w!g2*_#DM9Px{ z)zrL>$REzTeLO*c>!dQtP&cTI5jwm*`H%cd+NUVIGx>klq2&q>NDKf6HZRAm5SfAi O00009j^#8IhLa6awAF1XkU~ehbWmkQ z0ndYIpdpbcpg=4Suwq^%D|+S?j6j+;3r$9{@}WDwtP>yNh`ow9#f`_GZU5)kJ{hOl zT0K@JYs#pdZb6rD6Pk;tJ3z}Vs6RmQ7Bn27^<=~W;#^e2_&=hlfSU6Wp@7<3(R?cE zA(qj4Hi`w*9ipXx?#l?^-O+G})-zGVA!6D^^)X^RH5#`pWeq%zMZ_^WZ@v6JJlt%- z=CU2tKK*`e$P{)@zu$UfmBVNX6RM@B52lbbRkYWI6Mqrvq7!e;FZ^3P2~9qRHM6GV z4C&w<4dvrtrLq7BGm3OlS0{*mv;8Rx4BgtB`3o^yZ1O?x5e{ z`>dBu_7+~5c600)EpV43%jBTb_fAOW&`aeN(CR-k^5a+10aEeXi$uP8;I*Qt2!71N zFP5VCvl>L!>LY;J5Fd6z@jXbWN99ZYj3)Z6bTGXlIYF{nk3=BN4(njQ($iD0D1F|f zvB8@~W!NW5(9UcDn&No7Bifs>Fy0~hU=Mv_N5R`@Cnz&JN9~;_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T5? diff --git a/src/c/main.c b/src/c/main.c index 29c1a87..df5c091 100644 --- a/src/c/main.c +++ b/src/c/main.c @@ -2,15 +2,17 @@ // layer-age static Window *s_window; -static BitmapLayer *s_leaf_layer; static Layer *s_top_bar_layer; static Layer *s_bottom_bar_layer; +static BitmapLayer *s_clock_bmp_layer; +static BitmapLayer *s_check_bmp_layer; // bitmaps -static GBitmap *s_leaf_bmp; +static GBitmap *s_clock_bmp; +static GBitmap *s_check_bmp; // global vars -static GColor s_bar_color = GColorDarkGreen; +static GColor s_bar_color = GColorMayGreen; // constants static const uint8_t s_edge_bar_height = ((PBL_DISPLAY_HEIGHT / 7) * 2); @@ -27,32 +29,41 @@ static void rect_fill_layer_update_proc(Layer *layer, GContext *ctx) { } static void setter_window_load() { - window_set_background_color(s_window, GColorMintGreen); - - // leaf - s_leaf_bmp = gbitmap_create_with_resource(RESOURCE_ID_LEAF); - s_leaf_layer = bitmap_layer_create(GRect(PBL_IF_ROUND_ELSE(0, -4), PBL_IF_ROUND_ELSE(0, 7), PBL_IF_ROUND_ELSE(PBL_DISPLAY_WIDTH, PBL_DISPLAY_WIDTH + 8), PBL_DISPLAY_HEIGHT)); - bitmap_layer_set_alignment(s_leaf_layer, GAlignCenter); - bitmap_layer_set_compositing_mode(s_leaf_layer, GCompOpSet); - bitmap_layer_set_bitmap(s_leaf_layer, s_leaf_bmp); - // top&bottom bars - s_top_bar_layer = layer_create(GRect(0, 0, PBL_DISPLAY_WIDTH, s_edge_bar_height)); + GRect top_bar_grect = GRect(0, 0, PBL_DISPLAY_WIDTH, s_edge_bar_height); + s_top_bar_layer = layer_create(top_bar_grect); layer_set_update_proc(s_top_bar_layer, rect_fill_layer_update_proc); - s_bottom_bar_layer = layer_create(GRect(0, PBL_DISPLAY_HEIGHT - s_edge_bar_height, PBL_DISPLAY_WIDTH, s_edge_bar_height)); + GRect bottom_bar_grect = GRect(0, PBL_DISPLAY_HEIGHT - s_edge_bar_height, PBL_DISPLAY_WIDTH, s_edge_bar_height); + s_bottom_bar_layer = layer_create(bottom_bar_grect); layer_set_update_proc(s_bottom_bar_layer, rect_fill_layer_update_proc); + // clock icon + s_clock_bmp = gbitmap_create_with_resource(RESOURCE_ID_CLOCK35); + s_clock_bmp_layer = bitmap_layer_create(GRect(PBL_IF_ROUND_ELSE(0, 8), PBL_IF_ROUND_ELSE(8, 0), top_bar_grect.size.w, top_bar_grect.size.h)); + bitmap_layer_set_bitmap(s_clock_bmp_layer, s_clock_bmp); + bitmap_layer_set_alignment(s_clock_bmp_layer, PBL_IF_ROUND_ELSE(GAlignTop, GAlignLeft)); + bitmap_layer_set_compositing_mode(s_clock_bmp_layer, GCompOpSet); + + // check icon + s_check_bmp = gbitmap_create_with_resource(RESOURCE_ID_CHECK); + s_check_bmp_layer = bitmap_layer_create(bottom_bar_grect); + bitmap_layer_set_bitmap(s_check_bmp_layer, s_check_bmp); + bitmap_layer_set_compositing_mode(s_check_bmp_layer, GCompOpSet); + Layer *window_layer = window_get_root_layer(s_window); - layer_add_child(window_layer, bitmap_layer_get_layer(s_leaf_layer)); layer_add_child(window_layer, s_top_bar_layer); layer_add_child(window_layer, s_bottom_bar_layer); + layer_add_child(window_layer, bitmap_layer_get_layer(s_clock_bmp_layer)); + layer_add_child(window_layer, bitmap_layer_get_layer(s_check_bmp_layer)); } static void setter_window_unload() { + bitmap_layer_destroy(s_check_bmp_layer); + bitmap_layer_destroy(s_clock_bmp_layer); + gbitmap_destroy(s_check_bmp); + gbitmap_destroy(s_clock_bmp); layer_destroy(s_bottom_bar_layer); layer_destroy(s_top_bar_layer); - bitmap_layer_destroy(s_leaf_layer); - gbitmap_destroy(s_leaf_bmp); } static void init() { @@ -60,7 +71,7 @@ static void init() { switch (launch_reason()) { case APP_LAUNCH_WAKEUP: - break; // TODO alarm game time! + break; // TODO math time! default: window_set_window_handlers( s_window,