|
@@ -262,139 +262,6 @@ IconContext *get_icon_context(const char *name)
|
|
|
return NULL;
|
|
return NULL;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-IconContext *get_icon_context_furi(const FuriString *name)
|
|
|
|
|
-{
|
|
|
|
|
- if (furi_string_cmp(name, "earth") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("earth", &I_icon_earth_15x16, 15, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "home") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("home", &I_icon_home_15x16, 15, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "house") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("house", &I_icon_house_48x32px, 48, 32);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "house_3d") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("house_3d", &I_icon_house_3d_34x45px, 34, 45);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "info") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("info", &I_icon_info_15x16, 15, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "man") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("man", &I_icon_man_7x16, 7, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "plant") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("plant", &I_icon_plant_16x16, 16, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "plant_fern") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("plant_fern", &I_icon_plant_fern_18x16px, 18, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "plant_pointy") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("plant_pointy", &I_icon_plant_pointy_13x16px, 13, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "tree") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("tree", &I_icon_tree_16x16, 16, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "tree_29x30") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("tree_29x30", &I_icon_tree_29x30px, 29, 30);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "tree_48x48") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("tree_48x48", &I_icon_tree_48x48px, 48, 48);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "woman") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("woman", &I_icon_woman_9x16, 9, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "chest_closed") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("chest_closed", &I_icon_chest_closed_16x13px, 16, 13);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "chest_open") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("chest_open", &I_icon_chest_open_16x16px, 16, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "fence") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("fence", &I_icon_fence_16x8px, 16, 8);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "fence_end") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("fence_end", &I_icon_fence_end_16x8px, 16, 8);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "fence_vertical_end") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("fence_vertical_end", &I_icon_fence_vertical_end_6x8px, 6, 8);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "fence_vertical_start") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("fence_vertical_start", &I_icon_fence_vertical_start_6x15px, 6, 15);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "flower") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("flower", &I_icon_flower_16x16, 16, 16);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_bottom") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("lake_bottom", &I_icon_lake_bottom_31x12px, 31, 12);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_bottom_left") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("lake_bottom_left", &I_icon_lake_bottom_left_24x22px, 24, 22);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_bottom_right") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("lake_bottom_right", &I_icon_lake_bottom_right_24x22px, 24, 22);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_left") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("lake_left", &I_icon_lake_left_11x31px, 11, 31);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_right") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- // Assuming dimensions 11x31
|
|
|
|
|
- return icon_generic_alloc("lake_right", &I_icon_lake_right_11x31, 11, 31);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_top") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("lake_top", &I_icon_lake_top_31x12px, 31, 12);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_top_left") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("lake_top_left", &I_icon_lake_top_left_24x22px, 24, 22);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "lake_top_right") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("lake_top_right", &I_icon_lake_top_right_24x22px, 24, 22);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "rock_large") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("rock_large", &I_icon_rock_large_18x19px, 18, 19);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "rock_medium") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("rock_medium", &I_icon_rock_medium_16x14px, 16, 14);
|
|
|
|
|
- }
|
|
|
|
|
- else if (furi_string_cmp(name, "rock_small") == 0)
|
|
|
|
|
- {
|
|
|
|
|
- return icon_generic_alloc("rock_small", &I_icon_rock_small_10x8px, 10, 8);
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
- // If no match is found
|
|
|
|
|
- FURI_LOG_E("Game", "Icon not found: %s", furi_string_get_cstr(name));
|
|
|
|
|
- return NULL;
|
|
|
|
|
-}
|
|
|
|
|
-
|
|
|
|
|
const char *icon_get_id(const Icon *icon)
|
|
const char *icon_get_id(const Icon *icon)
|
|
|
{
|
|
{
|
|
|
if (icon == &I_icon_earth_15x16)
|
|
if (icon == &I_icon_earth_15x16)
|