diff --git a/components/platform/CMakeLists.txt b/components/platform/CMakeLists.txt index d2b1c3d..f2b7308 100644 --- a/components/platform/CMakeLists.txt +++ b/components/platform/CMakeLists.txt @@ -114,6 +114,14 @@ set(platform_lcd_png_assets tu1 jin0 jin1 + south0 + southwest0 + west0 + northwest0 + north0 + northeast0 + east0 + southeast0 icon_shui0 icon_mu0 icon_huo0 diff --git a/components/platform/assets/lcd/east0.png b/components/platform/assets/lcd/east0.png new file mode 100644 index 0000000..ef02305 Binary files /dev/null and b/components/platform/assets/lcd/east0.png differ diff --git a/components/platform/assets/lcd/north0.png b/components/platform/assets/lcd/north0.png new file mode 100644 index 0000000..028f5df Binary files /dev/null and b/components/platform/assets/lcd/north0.png differ diff --git a/components/platform/assets/lcd/northeast0.png b/components/platform/assets/lcd/northeast0.png new file mode 100644 index 0000000..103b643 Binary files /dev/null and b/components/platform/assets/lcd/northeast0.png differ diff --git a/components/platform/assets/lcd/northwest0.png b/components/platform/assets/lcd/northwest0.png new file mode 100644 index 0000000..a39e738 Binary files /dev/null and b/components/platform/assets/lcd/northwest0.png differ diff --git a/components/platform/assets/lcd/south0.png b/components/platform/assets/lcd/south0.png new file mode 100644 index 0000000..d22cd9d Binary files /dev/null and b/components/platform/assets/lcd/south0.png differ diff --git a/components/platform/assets/lcd/southeast0.png b/components/platform/assets/lcd/southeast0.png new file mode 100644 index 0000000..b71a400 Binary files /dev/null and b/components/platform/assets/lcd/southeast0.png differ diff --git a/components/platform/assets/lcd/southwest0.png b/components/platform/assets/lcd/southwest0.png new file mode 100644 index 0000000..ac86c35 Binary files /dev/null and b/components/platform/assets/lcd/southwest0.png differ diff --git a/components/platform/assets/lcd/west0.png b/components/platform/assets/lcd/west0.png new file mode 100644 index 0000000..724dff8 Binary files /dev/null and b/components/platform/assets/lcd/west0.png differ diff --git a/components/platform/src/lcd_direct_assets.c b/components/platform/src/lcd_direct_assets.c index da7bb6c..f2545fa 100644 --- a/components/platform/src/lcd_direct_assets.c +++ b/components/platform/src/lcd_direct_assets.c @@ -155,6 +155,38 @@ static const lcd_direct_image_t s_jin_frames[] = { }, }; +static const lcd_direct_image_t s_south_frames[] = { + {.path = LCD_ASSET_BASE_PATH "south0.png"}, +}; + +static const lcd_direct_image_t s_southwest_frames[] = { + {.path = LCD_ASSET_BASE_PATH "southwest0.png"}, +}; + +static const lcd_direct_image_t s_west_frames[] = { + {.path = LCD_ASSET_BASE_PATH "west0.png"}, +}; + +static const lcd_direct_image_t s_northwest_frames[] = { + {.path = LCD_ASSET_BASE_PATH "northwest0.png"}, +}; + +static const lcd_direct_image_t s_north_frames[] = { + {.path = LCD_ASSET_BASE_PATH "north0.png"}, +}; + +static const lcd_direct_image_t s_northeast_frames[] = { + {.path = LCD_ASSET_BASE_PATH "northeast0.png"}, +}; + +static const lcd_direct_image_t s_east_frames[] = { + {.path = LCD_ASSET_BASE_PATH "east0.png"}, +}; + +static const lcd_direct_image_t s_southeast_frames[] = { + {.path = LCD_ASSET_BASE_PATH "southeast0.png"}, +}; + static const lcd_direct_icon_t s_wuxing_icons[] = { { .path = LCD_ASSET_BASE_PATH "icon_shui0.png", @@ -278,6 +310,54 @@ const lcd_direct_image_t *lcd_direct_asset_frame(const char *asset_dir, uint8_t frame_index); } + if (strcmp(asset_dir, "south") == 0) { + return lcd_direct_frame_from_array(s_south_frames, + sizeof(s_south_frames) / sizeof(s_south_frames[0]), + frame_index); + } + + if (strcmp(asset_dir, "southwest") == 0) { + return lcd_direct_frame_from_array(s_southwest_frames, + sizeof(s_southwest_frames) / sizeof(s_southwest_frames[0]), + frame_index); + } + + if (strcmp(asset_dir, "west") == 0) { + return lcd_direct_frame_from_array(s_west_frames, + sizeof(s_west_frames) / sizeof(s_west_frames[0]), + frame_index); + } + + if (strcmp(asset_dir, "northwest") == 0) { + return lcd_direct_frame_from_array(s_northwest_frames, + sizeof(s_northwest_frames) / sizeof(s_northwest_frames[0]), + frame_index); + } + + if (strcmp(asset_dir, "north") == 0) { + return lcd_direct_frame_from_array(s_north_frames, + sizeof(s_north_frames) / sizeof(s_north_frames[0]), + frame_index); + } + + if (strcmp(asset_dir, "northeast") == 0) { + return lcd_direct_frame_from_array(s_northeast_frames, + sizeof(s_northeast_frames) / sizeof(s_northeast_frames[0]), + frame_index); + } + + if (strcmp(asset_dir, "east") == 0) { + return lcd_direct_frame_from_array(s_east_frames, + sizeof(s_east_frames) / sizeof(s_east_frames[0]), + frame_index); + } + + if (strcmp(asset_dir, "southeast") == 0) { + return lcd_direct_frame_from_array(s_southeast_frames, + sizeof(s_southeast_frames) / sizeof(s_southeast_frames[0]), + frame_index); + } + return NULL; }