beginnings of shuffled theme counter + a couple qr bugfixes

This commit is contained in:
Helloman892
2017-09-04 20:13:09 +01:00
parent cca45bff0f
commit d3a8f79958
3 changed files with 7 additions and 1 deletions

View File

@@ -115,6 +115,11 @@ void draw_qr(void)
} }
} }
void draw_shuffle_selection(int shuffled_theme_count)
{
pp2d_draw_text(36, 2, 0.6, 0.6, COLOR_WHITE, "%d/10", shuffled_theme_count);
}
void draw_base_interface(void) void draw_base_interface(void)
{ {
pp2d_begin_draw(GFX_TOP); pp2d_begin_draw(GFX_TOP);

View File

@@ -199,6 +199,7 @@ int main(void)
current_theme->in_shuffle = false; current_theme->in_shuffle = false;
} }
} }
draw_shuffle_selection(shuffle_theme_count);
} }
} }

View File

@@ -393,7 +393,7 @@ Result shuffle_install(Theme_s *themes_list, int theme_count)
u32 bgm_sizes[10] = {0}; u32 bgm_sizes[10] = {0};
for (int i = 0; i < theme_count; i++) for (int i = 0; i < theme_count; i++)
{ {
if (count > 9) return MAKERESULT(RL_USAGE, RS_INVALIDARG, RM_COMMON, RD_INVALID_SELECTION); if (count > 10) return MAKERESULT(RL_USAGE, RS_INVALIDARG, RM_COMMON, RD_INVALID_SELECTION);
if (themes_list[i].in_shuffle) if (themes_list[i].in_shuffle)
{ {
shuffle_themes[count++] = &themes_list[i]; shuffle_themes[count++] = &themes_list[i];