mirror of
https://github.com/CTCaer/RetroArch.git
synced 2025-03-06 18:37:11 +00:00
Initial test for badge icon
This commit is contained in:
parent
f0becad9d9
commit
84e80e47df
@ -2157,14 +2157,14 @@ void cheevos_populate_menu(void *data, bool hardcore)
|
|||||||
{
|
{
|
||||||
menu_entries_append_enum(info->list, cheevo->title,
|
menu_entries_append_enum(info->list, cheevo->title,
|
||||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_UNLOCKED_ENTRY,
|
||||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
MENU_SETTINGS_CHEEVOS_START + i, 0, atoi(cheevo->badge));
|
||||||
items_found++;
|
items_found++;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
menu_entries_append_enum(info->list, cheevo->title,
|
menu_entries_append_enum(info->list, cheevo->title,
|
||||||
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
cheevo->description, MENU_ENUM_LABEL_CHEEVOS_LOCKED_ENTRY,
|
||||||
MENU_SETTINGS_CHEEVOS_START + i, 0, 0);
|
MENU_SETTINGS_CHEEVOS_START + i, 0, atoi(cheevo->badge));
|
||||||
items_found++;
|
items_found++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -3337,8 +3337,12 @@ static int cheevos_iterate(coro_t* coro)
|
|||||||
else
|
else
|
||||||
RARCH_ERR("[CHEEVOS]: error deactivating unlocked achievements in softcore mode.\n");
|
RARCH_ERR("[CHEEVOS]: error deactivating unlocked achievements in softcore mode.\n");
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
if ((void*)CHEEVOS_VAR_JSON)
|
if ((void*)CHEEVOS_VAR_JSON)
|
||||||
free((void*)CHEEVOS_VAR_JSON);
|
free((void*)CHEEVOS_VAR_JSON);
|
||||||
|
=======
|
||||||
|
free((void*)CHEEVOS_VAR_JSON);
|
||||||
|
>>>>>>> Initial test for badge icon
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
RARCH_ERR("[CHEEVOS]: error retrieving list of unlocked achievements in softcore mode.\n");
|
RARCH_ERR("[CHEEVOS]: error retrieving list of unlocked achievements in softcore mode.\n");
|
||||||
@ -3366,8 +3370,12 @@ static int cheevos_iterate(coro_t* coro)
|
|||||||
else
|
else
|
||||||
RARCH_ERR("[CHEEVOS]: error deactivating unlocked achievements in hardcore mode.\n");
|
RARCH_ERR("[CHEEVOS]: error deactivating unlocked achievements in hardcore mode.\n");
|
||||||
|
|
||||||
|
<<<<<<< HEAD
|
||||||
if ((void*)CHEEVOS_VAR_JSON)
|
if ((void*)CHEEVOS_VAR_JSON)
|
||||||
free((void*)CHEEVOS_VAR_JSON);
|
free((void*)CHEEVOS_VAR_JSON);
|
||||||
|
=======
|
||||||
|
free((void*)CHEEVOS_VAR_JSON);
|
||||||
|
>>>>>>> Initial test for badge icon
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
RARCH_ERR("[CHEEVOS]: error retrieving list of unlocked achievements in hardcore mode.\n");
|
RARCH_ERR("[CHEEVOS]: error retrieving list of unlocked achievements in hardcore mode.\n");
|
||||||
|
@ -252,6 +252,15 @@ typedef struct xmb_handle
|
|||||||
menu_texture_item list[XMB_TEXTURE_LAST];
|
menu_texture_item list[XMB_TEXTURE_LAST];
|
||||||
} textures;
|
} textures;
|
||||||
|
|
||||||
|
#ifdef HAVE_CHEEVOS
|
||||||
|
struct
|
||||||
|
{
|
||||||
|
size_t current_badge;
|
||||||
|
menu_texture_item test;
|
||||||
|
menu_texture_item list[XMB_TEXTURE_LAST];
|
||||||
|
} badges;
|
||||||
|
#endif
|
||||||
|
|
||||||
xmb_node_t main_menu_node;
|
xmb_node_t main_menu_node;
|
||||||
#ifdef HAVE_IMAGEVIEWER
|
#ifdef HAVE_IMAGEVIEWER
|
||||||
xmb_node_t images_tab_node;
|
xmb_node_t images_tab_node;
|
||||||
@ -2239,6 +2248,20 @@ static uintptr_t xmb_icon_get_id(xmb_handle_t *xmb,
|
|||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef HAVE_CHEEVOS
|
||||||
|
if ((type >= MENU_SETTINGS_CHEEVOS_START) &&
|
||||||
|
(type < MENU_SETTINGS_NETPLAY_ROOMS_START))
|
||||||
|
{
|
||||||
|
unsigned new_id = type - MENU_SETTINGS_CHEEVOS_START;
|
||||||
|
int bufferSize = 16;
|
||||||
|
char new_str[bufferSize];
|
||||||
|
snprintf(new_str, bufferSize, "%05d", (int)xmb->badges.current_badge);
|
||||||
|
strcat(new_str, ".png");
|
||||||
|
menu_display_reset_textures_list(new_str, "badges", &xmb->badges.list[new_id], TEXTURE_FILTER_MIPMAP_LINEAR);
|
||||||
|
return xmb->badges.list[new_id];
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return xmb->textures.list[XMB_TEXTURE_SUBSETTING];
|
return xmb->textures.list[XMB_TEXTURE_SUBSETTING];
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -2466,6 +2489,10 @@ static int xmb_draw_item(
|
|||||||
|
|
||||||
if (color[3] != 0)
|
if (color[3] != 0)
|
||||||
{
|
{
|
||||||
|
#ifdef HAVE_CHEEVOS
|
||||||
|
xmb->badges.current_badge = entry->entry_idx;
|
||||||
|
#endif
|
||||||
|
|
||||||
math_matrix_4x4 mymat_tmp;
|
math_matrix_4x4 mymat_tmp;
|
||||||
menu_display_ctx_rotate_draw_t rotate_draw;
|
menu_display_ctx_rotate_draw_t rotate_draw;
|
||||||
uintptr_t texture = xmb_icon_get_id(xmb, core_node, node,
|
uintptr_t texture = xmb_icon_get_id(xmb, core_node, node,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user