Initial basic functionality commit

What this commit adds:
* Ability to apply a theme, given a folder
* Extract all .zip files in /Themes/ into a relevant folder
* Get all theme metadata from info.smdh
* Proper unicode handling

What's still needed for initial release:
* Theme shuffling
* GUI
This commit is contained in:
Alex Taber
2017-07-20 17:19:07 -04:00
committed by GitHub
parent 9d405d958a
commit 217846bca4
21 changed files with 4924 additions and 124 deletions

30
source/theme.h Normal file
View File

@@ -0,0 +1,30 @@
#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[533];
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_theme(FS_DirectoryEntry*, u16*);
Result prepareThemes(node*);
Result themeInstall(theme_data);
Result closeThemeArchives();
Result parseSmdh(theme_data*, u16*);