This commit adds support for theme shuffles. To use, pass the first node for the theme into the install_shuffle method and it'll automatically install based on what's selected. Note that right now, *all themes in /Themes/ are selected for debug purposes.* This means if you have more than 10 themes in /Themes/ it will not work right now. This will be changed once an interface for selecting themes is done.
33 lines
592 B
C
33 lines
592 B
C
#pragma once
|
|
|
|
#include "minizip/unzip.h"
|
|
#include "linked_lists.h"
|
|
|
|
struct theme_data
|
|
{
|
|
u16 title[0x40];
|
|
u16 description[0x80];
|
|
u16 author[0x40];
|
|
char iconData[0x1200];
|
|
u16 path[524];
|
|
bool selected;
|
|
bool bgm;
|
|
};
|
|
|
|
typedef struct theme_data theme_data;
|
|
|
|
u8 regionCode;
|
|
u32 archive1;
|
|
u32 archive2;
|
|
|
|
FS_Archive ArchiveSD;
|
|
FS_Archive ArchiveHomeExt;
|
|
FS_Archive ArchiveThemeExt;
|
|
|
|
Result unzip_file(char*, FS_DirectoryEntry*, u16*);
|
|
Result prepareThemes(node*);
|
|
Result themeInstall(theme_data);
|
|
Result shuffle_install(node*);
|
|
Result closeThemeArchives();
|
|
Result parseSmdh(theme_data*, u16*);
|