Several improvements (#9)

* fix icon filename

* update pp2d to fix preview problem

* several improvements:
- rely on a single header for simple/common headers
- cleaned up main by putting the interface drawing function in its own file
- load previews from .zip themes (may cause some loading times when launching
- only need 1 shuffle image thanks to pp2d's blending abilities

* not needed anymore

* fix preview color and position

* forgot

* add proper icon loading
thanks steveice10 for bannertool which this was pretty much taken from

* only add proper themes to the list

* add slightly more space between the icon and the name

* not monospace, the little movement every blink is annoying

* fix typo
This commit is contained in:
LiquidFenrir
2017-08-31 13:55:00 +02:00
committed by Alex Taber
parent 9beae916b0
commit ebd2a9d6ae
14 changed files with 537 additions and 232 deletions

View File

@@ -27,26 +27,27 @@
#ifndef THEMES_H
#define THEMES_H
#include <3ds.h>
#define TEX_COUNT 3
#include "common.h"
typedef struct {
u16 name[0x40];
u16 desc[0x80];
u16 author[0x40];
char icon_data[0x1200];
u16 name[0x80];
u16 desc[0x100];
u16 author[0x80];
bool has_icon;
ssize_t icon_id;
bool has_preview;
ssize_t preview_id;
u16 path[262];
bool is_zip;
bool selected;
ssize_t preview_id;
bool has_preview;
char preview_path[0x106];
} theme;
bool in_shuffle;
} Theme_s;
void parse_smdh(theme *entry, u16 *path);
int scan_themes(theme **themes, int num_themes);
Result single_install(theme);
Result shuffle_install(theme **themes_list, int num_themes);
Result get_themes(Theme_s **themes_list, int *theme_count);
Result single_install(Theme_s theme);
Result shuffle_install(Theme_s *themes_list, int theme_count);
#endif