mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-23 16:09:47 +00:00
(XMB) Cleanups
This commit is contained in:
parent
e1db81787d
commit
07d19dd807
@ -427,7 +427,7 @@ typedef struct xmb_handle
|
||||
bool entry_idx_enabled;
|
||||
} xmb_handle_t;
|
||||
|
||||
static float xmb_scale_mod[8] = {
|
||||
static float xmb_scale_mod[8] = {
|
||||
1, 1, 1, 1, 1, 1, 1, 1
|
||||
};
|
||||
|
||||
@ -438,177 +438,39 @@ static float xmb_coord_shadow[] = {
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static float xmb_coord_black[] = {
|
||||
static float xmb_coord_black[] = {
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0,
|
||||
0, 0, 0, 0
|
||||
};
|
||||
|
||||
static float xmb_coord_white[] = {
|
||||
static float xmb_coord_white[] = {
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1
|
||||
};
|
||||
|
||||
static float item_color[] = {
|
||||
static float item_color[] = {
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1,
|
||||
1, 1, 1, 1
|
||||
};
|
||||
|
||||
float gradient_dark_purple[16] = {
|
||||
20/255.0, 13/255.0, 20/255.0, 1.0,
|
||||
20/255.0, 13/255.0, 20/255.0, 1.0,
|
||||
92/255.0, 44/255.0, 92/255.0, 1.0,
|
||||
148/255.0, 90/255.0, 148/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_midnight_blue[16] = {
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_golden[16] = {
|
||||
174/255.0, 123/255.0, 44/255.0, 1.0,
|
||||
205/255.0, 174/255.0, 84/255.0, 1.0,
|
||||
58/255.0, 43/255.0, 24/255.0, 1.0,
|
||||
58/255.0, 43/255.0, 24/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_legacy_red[16] = {
|
||||
171/255.0, 70/255.0, 59/255.0, 1.0,
|
||||
171/255.0, 70/255.0, 59/255.0, 1.0,
|
||||
190/255.0, 80/255.0, 69/255.0, 1.0,
|
||||
190/255.0, 80/255.0, 69/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_electric_blue[16] = {
|
||||
1/255.0, 2/255.0, 67/255.0, 1.0,
|
||||
1/255.0, 73/255.0, 183/255.0, 1.0,
|
||||
1/255.0, 93/255.0, 194/255.0, 1.0,
|
||||
3/255.0, 162/255.0, 254/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_apple_green[16] = {
|
||||
102/255.0, 134/255.0, 58/255.0, 1.0,
|
||||
122/255.0, 131/255.0, 52/255.0, 1.0,
|
||||
82/255.0, 101/255.0, 35/255.0, 1.0,
|
||||
63/255.0, 95/255.0, 30/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_undersea[16] = {
|
||||
23/255.0, 18/255.0, 41/255.0, 1.0,
|
||||
30/255.0, 72/255.0, 114/255.0, 1.0,
|
||||
52/255.0, 88/255.0, 110/255.0, 1.0,
|
||||
69/255.0, 125/255.0, 140/255.0, 1.0,
|
||||
|
||||
};
|
||||
|
||||
float gradient_volcanic_red[16] = {
|
||||
1.0, 0.0, 0.1, 1.00,
|
||||
1.0, 0.1, 0.0, 1.00,
|
||||
0.1, 0.0, 0.1, 1.00,
|
||||
0.1, 0.0, 0.1, 1.00,
|
||||
};
|
||||
|
||||
float gradient_dark[16] = {
|
||||
0.1, 0.1, 0.1, 1.00,
|
||||
0.1, 0.1, 0.1, 1.00,
|
||||
0.0, 0.0, 0.0, 1.00,
|
||||
0.0, 0.0, 0.0, 1.00,
|
||||
};
|
||||
|
||||
float gradient_light[16] = {
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
};
|
||||
|
||||
float gradient_morning_blue[16] = {
|
||||
221/255.0, 241/255.0, 254/255.0, 1.00,
|
||||
135/255.0, 206/255.0, 250/255.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
170/255.0, 200/255.0, 252/255.0, 1.00,
|
||||
};
|
||||
|
||||
float gradient_sunbeam[16] = {
|
||||
20/255.0, 13/255.0, 20/255.0, 1.0,
|
||||
30/255.0, 72/255.0, 114/255.0, 1.0,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
0.1, 0.0, 0.1, 1.00,
|
||||
};
|
||||
|
||||
float gradient_lime_green[16] = {
|
||||
209/255.0, 255/255.0, 82/255.0, 1.0,
|
||||
146/255.0, 232/255.0, 66/255.0, 1.0,
|
||||
82/255.0, 101/255.0, 35/255.0, 1.0,
|
||||
63/255.0, 95/255.0, 30/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_pikachu_yellow[16] = {
|
||||
63/255.0, 63/255.0, 1/255.0, 1.0,
|
||||
174/255.0, 174/255.0, 1/255.0, 1.0,
|
||||
191/255.0, 194/255.0, 1/255.0, 1.0,
|
||||
254/255.0, 221/255.0, 3/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_gamecube_purple[16] = {
|
||||
40/255.0, 20/255.0, 91/255.0, 1.0,
|
||||
160/255.0, 140/255.0, 211/255.0, 1.0,
|
||||
107/255.0, 92/255.0, 177/255.0, 1.0,
|
||||
84/255.0, 71/255.0, 132/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_famicom_red[16] = {
|
||||
255/255.0, 191/255.0, 171/255.0, 1.0,
|
||||
119/255.0, 49/255.0, 28/255.0, 1.0,
|
||||
148/255.0, 10/255.0, 36/255.0, 1.0,
|
||||
206/255.0, 126/255.0, 110/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_flaming_hot[16] = {
|
||||
231/255.0, 53/255.0, 53/255.0, 1.0,
|
||||
242/255.0, 138/255.0, 97/255.0, 1.0,
|
||||
236/255.0, 97/255.0, 76/255.0, 1.0,
|
||||
255/255.0, 125/255.0, 3/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_ice_cold[16] = {
|
||||
66/255.0, 183/255.0, 229/255.0, 1.0,
|
||||
29/255.0, 164/255.0, 255/255.0, 1.0,
|
||||
176/255.0, 255/255.0, 247/255.0, 1.0,
|
||||
174/255.0, 240/255.0, 255/255.0, 1.0,
|
||||
};
|
||||
|
||||
float gradient_midgar[16] = {
|
||||
255/255.0, 0/255.0, 0/255.0, 1.0,
|
||||
0/255.0, 0/255.0, 255/255.0, 1.0,
|
||||
0/255.0, 255/255.0, 0/255.0, 1.0,
|
||||
32/255.0, 32/255.0, 32/255.0, 1.0,
|
||||
};
|
||||
|
||||
static INLINE float xmb_item_y(const xmb_handle_t *xmb, int i, size_t current)
|
||||
{
|
||||
float iy = xmb->icon_spacing_vertical;
|
||||
|
||||
float icon_spacing_vertical = xmb->icon_spacing_vertical;
|
||||
if (i < (int)current)
|
||||
{
|
||||
if (xmb->depth > 1)
|
||||
iy *= (i - (int)current + xmb->above_subitem_offset);
|
||||
else
|
||||
iy *= (i - (int)current + xmb->above_item_offset);
|
||||
else
|
||||
iy *= (i - (int)current + xmb->under_item_offset);
|
||||
|
||||
if (i == (int)current)
|
||||
iy = xmb->icon_spacing_vertical * xmb->active_item_factor;
|
||||
|
||||
return iy;
|
||||
return icon_spacing_vertical * (i - (int)current + xmb->above_subitem_offset);
|
||||
return icon_spacing_vertical * (i - (int)current + xmb->above_item_offset);
|
||||
}
|
||||
else if (i == (int)current)
|
||||
return icon_spacing_vertical * xmb->active_item_factor;
|
||||
return icon_spacing_vertical * (i - (int)current + xmb->under_item_offset);
|
||||
}
|
||||
|
||||
|
||||
@ -619,8 +481,8 @@ static void xmb_calculate_visible_range(const xmb_handle_t *xmb,
|
||||
unsigned j;
|
||||
float base_y = xmb->margins_screen_top;
|
||||
|
||||
*first = 0;
|
||||
*last = (unsigned)(list_size ? list_size - 1 : 0);
|
||||
*first = 0;
|
||||
*last = (unsigned)(list_size ? list_size - 1 : 0);
|
||||
|
||||
if (current)
|
||||
{
|
||||
@ -754,6 +616,135 @@ static xmb_node_t *xmb_copy_node(const xmb_node_t *old_node)
|
||||
|
||||
static float *xmb_gradient_ident(unsigned xmb_color_theme)
|
||||
{
|
||||
static float gradient_golden[16] = {
|
||||
174/255.0, 123/255.0, 44/255.0, 1.0,
|
||||
205/255.0, 174/255.0, 84/255.0, 1.0,
|
||||
58/255.0, 43/255.0, 24/255.0, 1.0,
|
||||
58/255.0, 43/255.0, 24/255.0, 1.0,
|
||||
};
|
||||
static float gradient_legacy_red[16] = {
|
||||
171/255.0, 70/255.0, 59/255.0, 1.0,
|
||||
171/255.0, 70/255.0, 59/255.0, 1.0,
|
||||
190/255.0, 80/255.0, 69/255.0, 1.0,
|
||||
190/255.0, 80/255.0, 69/255.0, 1.0,
|
||||
};
|
||||
static float gradient_electric_blue[16] = {
|
||||
1/255.0, 2/255.0, 67/255.0, 1.0,
|
||||
1/255.0, 73/255.0, 183/255.0, 1.0,
|
||||
1/255.0, 93/255.0, 194/255.0, 1.0,
|
||||
3/255.0, 162/255.0, 254/255.0, 1.0,
|
||||
};
|
||||
static float gradient_dark_purple[16] = {
|
||||
20/255.0, 13/255.0, 20/255.0, 1.0,
|
||||
20/255.0, 13/255.0, 20/255.0, 1.0,
|
||||
92/255.0, 44/255.0, 92/255.0, 1.0,
|
||||
148/255.0, 90/255.0, 148/255.0, 1.0,
|
||||
};
|
||||
static float gradient_midnight_blue[16] = {
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
44/255.0, 62/255.0, 80/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_apple_green[16] = {
|
||||
102/255.0, 134/255.0, 58/255.0, 1.0,
|
||||
122/255.0, 131/255.0, 52/255.0, 1.0,
|
||||
82/255.0, 101/255.0, 35/255.0, 1.0,
|
||||
63/255.0, 95/255.0, 30/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_undersea[16] = {
|
||||
23/255.0, 18/255.0, 41/255.0, 1.0,
|
||||
30/255.0, 72/255.0, 114/255.0, 1.0,
|
||||
52/255.0, 88/255.0, 110/255.0, 1.0,
|
||||
69/255.0, 125/255.0, 140/255.0, 1.0,
|
||||
|
||||
};
|
||||
|
||||
static float gradient_volcanic_red[16] = {
|
||||
1.0, 0.0, 0.1, 1.00,
|
||||
1.0, 0.1, 0.0, 1.00,
|
||||
0.1, 0.0, 0.1, 1.00,
|
||||
0.1, 0.0, 0.1, 1.00,
|
||||
};
|
||||
|
||||
static float gradient_dark[16] = {
|
||||
0.1, 0.1, 0.1, 1.00,
|
||||
0.1, 0.1, 0.1, 1.00,
|
||||
0.0, 0.0, 0.0, 1.00,
|
||||
0.0, 0.0, 0.0, 1.00,
|
||||
};
|
||||
|
||||
static float gradient_light[16] = {
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
};
|
||||
|
||||
static float gradient_morning_blue[16] = {
|
||||
221/255.0, 241/255.0, 254/255.0, 1.00,
|
||||
135/255.0, 206/255.0, 250/255.0, 1.00,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
170/255.0, 200/255.0, 252/255.0, 1.00,
|
||||
};
|
||||
|
||||
static float gradient_sunbeam[16] = {
|
||||
20/255.0, 13/255.0, 20/255.0, 1.0,
|
||||
30/255.0, 72/255.0, 114/255.0, 1.0,
|
||||
1.0, 1.0, 1.0, 1.00,
|
||||
0.1, 0.0, 0.1, 1.00,
|
||||
};
|
||||
|
||||
static float gradient_lime_green[16] = {
|
||||
209/255.0, 255/255.0, 82/255.0, 1.0,
|
||||
146/255.0, 232/255.0, 66/255.0, 1.0,
|
||||
82/255.0, 101/255.0, 35/255.0, 1.0,
|
||||
63/255.0, 95/255.0, 30/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_pikachu_yellow[16] = {
|
||||
63/255.0, 63/255.0, 1/255.0, 1.0,
|
||||
174/255.0, 174/255.0, 1/255.0, 1.0,
|
||||
191/255.0, 194/255.0, 1/255.0, 1.0,
|
||||
254/255.0, 221/255.0, 3/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_gamecube_purple[16] = {
|
||||
40/255.0, 20/255.0, 91/255.0, 1.0,
|
||||
160/255.0, 140/255.0, 211/255.0, 1.0,
|
||||
107/255.0, 92/255.0, 177/255.0, 1.0,
|
||||
84/255.0, 71/255.0, 132/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_famicom_red[16] = {
|
||||
255/255.0, 191/255.0, 171/255.0, 1.0,
|
||||
119/255.0, 49/255.0, 28/255.0, 1.0,
|
||||
148/255.0, 10/255.0, 36/255.0, 1.0,
|
||||
206/255.0, 126/255.0, 110/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_flaming_hot[16] = {
|
||||
231/255.0, 53/255.0, 53/255.0, 1.0,
|
||||
242/255.0, 138/255.0, 97/255.0, 1.0,
|
||||
236/255.0, 97/255.0, 76/255.0, 1.0,
|
||||
255/255.0, 125/255.0, 3/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_ice_cold[16] = {
|
||||
66/255.0, 183/255.0, 229/255.0, 1.0,
|
||||
29/255.0, 164/255.0, 255/255.0, 1.0,
|
||||
176/255.0, 255/255.0, 247/255.0, 1.0,
|
||||
174/255.0, 240/255.0, 255/255.0, 1.0,
|
||||
};
|
||||
|
||||
static float gradient_midgar[16] = {
|
||||
255/255.0, 0/255.0, 0/255.0, 1.0,
|
||||
0/255.0, 0/255.0, 255/255.0, 1.0,
|
||||
0/255.0, 255/255.0, 0/255.0, 1.0,
|
||||
32/255.0, 32/255.0, 32/255.0, 1.0,
|
||||
};
|
||||
switch (xmb_color_theme)
|
||||
{
|
||||
case XMB_THEME_DARK_PURPLE:
|
||||
|
Loading…
Reference in New Issue
Block a user