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

50
source/main.c Normal file
View File

@@ -0,0 +1,50 @@
#include <3ds.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "theme.h"
#include "unicode.h"
int main(void)
{
gfxInitDefault();
cfguInit();
srvInit();
hidInit();
fsInit();
ptmSysmInit();
consoleInit(GFX_TOP, NULL);
while (aptMainLoop())
{
hidScanInput();
u32 kDown = hidKeysDown();
if (kDown & KEY_A) {
node *first_node = malloc(sizeof(node));
first_node->data = NULL;
first_node->next = NULL;
prepareThemes(first_node);
node *current_node = first_node->next;
while (current_node != NULL)
{
printu(current_node->data->title);
current_node = current_node->next;
}
puts("Done!");
}
if (kDown & KEY_START)
{
closeThemeArchives();
PTMSYSM_ShutdownAsync(0);
ptmSysmExit();
}
gfxFlushBuffers();
gfxSwapBuffers();
gspWaitForVBlank();
}
gfxExit();
return 0;
}