Add resources now that they are more stable; use cropped-to-content resources

This commit is contained in:
2026-03-15 23:23:15 -04:00
parent f83b291479
commit 7ba832f2c5
55 changed files with 28 additions and 3 deletions

1
.gitignore vendored
View File

@@ -1,4 +1,3 @@
/.clangd
/build
/resources
/.lock*

9
resources/fonts/LICENSE Normal file
View File

@@ -0,0 +1,9 @@
Retro Computer is an all-caps style retro pixel-font influenced by classic video games.
--------------------
This font is free for personal use.
Commercial use requires free amount donation through PayPal: hello@petyka.com
--------------------
www.petyka.com

Binary file not shown.

BIN
resources/images/b001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 516 B

BIN
resources/images/b002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

BIN
resources/images/b003.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 B

BIN
resources/images/b004.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 791 B

BIN
resources/images/b005.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
resources/images/b006.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

BIN
resources/images/b007.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

BIN
resources/images/b008.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 731 B

BIN
resources/images/b009.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

BIN
resources/images/b010.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 548 B

BIN
resources/images/b011.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 292 B

BIN
resources/images/b012.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

BIN
resources/images/b013.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 703 B

BIN
resources/images/b014.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

BIN
resources/images/b015.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 729 B

BIN
resources/images/b016.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 637 B

BIN
resources/images/b017.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 488 B

BIN
resources/images/b018.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 628 B

BIN
resources/images/b019.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 545 B

BIN
resources/images/b020.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 367 B

BIN
resources/images/b021.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 407 B

BIN
resources/images/b022.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 919 B

BIN
resources/images/b023.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 465 B

BIN
resources/images/b024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 543 B

BIN
resources/images/b025.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 838 B

BIN
resources/images/h001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 522 B

BIN
resources/images/h002.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 480 B

BIN
resources/images/h003.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 755 B

BIN
resources/images/h004.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 512 B

BIN
resources/images/h005.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 839 B

BIN
resources/images/h006.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 425 B

BIN
resources/images/h007.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 665 B

BIN
resources/images/h008.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 607 B

BIN
resources/images/h009.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 418 B

BIN
resources/images/h010.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 278 B

BIN
resources/images/h011.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 529 B

BIN
resources/images/h012.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 440 B

BIN
resources/images/h013.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 402 B

BIN
resources/images/h014.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 466 B

BIN
resources/images/h015.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
resources/images/h016.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

BIN
resources/images/h017.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 542 B

BIN
resources/images/h018.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 412 B

BIN
resources/images/h019.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

BIN
resources/images/h020.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 B

BIN
resources/images/h021.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 B

BIN
resources/images/h022.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 630 B

BIN
resources/images/h023.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 371 B

BIN
resources/images/h024.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 547 B

BIN
resources/images/h025.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 715 B

BIN
resources/images/xb001.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 706 B

View File

@@ -4,6 +4,7 @@
// declare general statics
static Window *s_main_window;
static GFont s_custom_font;
static Layer *s_time_bar_layer;
static TextLayer *s_time_layer;
static TextLayer *s_date_layer;
static BitmapLayer *s_guy_head_layer;
@@ -158,6 +159,11 @@ static void minute_handler(struct tm *tick_time, TimeUnits units_changed) {
}
}
static void time_bar_update_proc(Layer *layer, GContext *ctx) {
graphics_context_set_fill_color(ctx, GColorWhite);
graphics_fill_rect(ctx, layer_get_bounds(layer), 0, GCornerNone);
}
// define contents of the Window upon load
static void main_window_load(Window *window) {
Layer *window_layer = window_get_root_layer(window);
@@ -165,9 +171,11 @@ static void main_window_load(Window *window) {
// format silly guy layers
s_guy_head_layer = bitmap_layer_create(s_guy_head_grect_on);
s_guy_butt_layer = bitmap_layer_create(s_guy_butt_grect_on);
bitmap_layer_set_background_color(s_guy_head_layer, GColorBlack);
bitmap_layer_set_compositing_mode(s_guy_head_layer, GCompOpSet);
bitmap_layer_set_alignment(s_guy_head_layer, GAlignLeft);
bitmap_layer_set_bitmap(s_guy_head_layer, s_head_current);
bitmap_layer_set_background_color(s_guy_butt_layer, GColorBlack);
bitmap_layer_set_compositing_mode(s_guy_butt_layer, GCompOpSet);
bitmap_layer_set_alignment(s_guy_butt_layer, GAlignTopLeft);
bitmap_layer_set_bitmap(s_guy_butt_layer, s_butt_current);
// format time layer
@@ -182,9 +190,15 @@ static void main_window_load(Window *window) {
text_layer_set_font(s_date_layer, fonts_get_system_font(FONT_KEY_GOTHIC_14));
text_layer_set_text_alignment(s_date_layer, GTextAlignmentLeft);
// create time bar layer
GRect time_bar_frame = GRect(0, PBL_IF_ROUND_ELSE(115, 99), PBL_IF_ROUND_ELSE(260, 200), 30);
s_time_bar_layer = layer_create(time_bar_frame);
layer_set_update_proc(s_time_bar_layer, time_bar_update_proc);
// add layers as children to window
layer_add_child(window_layer, bitmap_layer_get_layer(s_guy_head_layer));
layer_add_child(window_layer, bitmap_layer_get_layer(s_guy_butt_layer));
layer_add_child(window_layer, s_time_bar_layer);
layer_add_child(window_layer, text_layer_get_layer(s_time_layer));
layer_add_child(window_layer, text_layer_get_layer(s_date_layer));
}
@@ -224,6 +238,9 @@ static void init() {
.load = main_window_load,
.unload = main_window_unload});
// set app background color
window_set_background_color(s_main_window, GColorBlack);
// load initial batch of silly guy parts into memory
s_head_current = gbitmap_create_with_resource(s_random_heads[rand() % s_head_count]);
s_butt_current = gbitmap_create_with_resource(s_random_butts[rand() % s_butt_count]);