mirror of
https://github.com/astronautlevel2/Anemone3DS.git
synced 2026-01-24 16:52:43 -05:00
Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 24810a48ad | |||
|
|
5d2119344a | ||
|
|
492ea13ef6 | ||
|
|
f99f744000 | ||
| 4fb10029bb | |||
| 7644974705 | |||
|
|
b7379af2f3 |
@@ -1,6 +1,7 @@
|
||||

|
||||
|
||||
A Theme and Splashscreen Manager for the Nintendo3DS, written in C.
|
||||
A Theme and Splashscreen Manager for the Nintendo 3DS, written in C.\
|
||||
To-do list here: https://trello.com/b/F1YSa1VK
|
||||
|
||||
# Dependencies
|
||||
* zlib, which can be retrieved from the [3ds_portlibs](https://github.com/devkitPro/3ds_portlibs).
|
||||
|
||||
@@ -48,6 +48,7 @@ static const int THEMES_PER_SCREEN = 4;
|
||||
|
||||
bool homebrew;
|
||||
bool splash_mode;
|
||||
int shuffle_theme_count;
|
||||
|
||||
enum TextureID {
|
||||
TEXTURE_FONT_RESERVED = 0, //used by pp2d for the font
|
||||
|
||||
@@ -30,9 +30,9 @@
|
||||
#include "common.h"
|
||||
|
||||
typedef struct {
|
||||
u16 name[0x40];
|
||||
u16 desc[0x80];
|
||||
u16 author[0x40];
|
||||
u16 name[0x41];
|
||||
u16 desc[0x81];
|
||||
u16 author[0x41];
|
||||
|
||||
u32 placeholder_color;
|
||||
ssize_t icon_id;
|
||||
|
||||
@@ -187,15 +187,15 @@ void draw_theme_interface(Theme_s * themes_list, int theme_count, int selected_t
|
||||
{
|
||||
draw_base_interface();
|
||||
pp2d_draw_text_center(GFX_TOP, 4, 0.5, 0.5, COLOR_WHITE, "Theme mode");
|
||||
wchar_t title[0x40] = {0};
|
||||
wchar_t title[0x41] = {0};
|
||||
utf16_to_utf32((u32*)title, current_theme.name, 0x40);
|
||||
pp2d_draw_wtext_wrap(20, 30, 0.7, 0.7, COLOR_WHITE, 380, title);
|
||||
wchar_t author[0x40] = {0};
|
||||
wchar_t author[0x41] = {0};
|
||||
utf16_to_utf32((u32*)author, current_theme.author, 0x40);
|
||||
pp2d_draw_text(20, 50, 0.5, 0.5, COLOR_WHITE, "By: ");
|
||||
pp2d_draw_wtext_wrap(44, 50, 0.5, 0.5, COLOR_WHITE, 380, author);
|
||||
wchar_t description[0xa6] = {0};
|
||||
utf16_to_utf32((u32*)description, current_theme.desc, 0xb0);
|
||||
wchar_t description[0x81] = {0};
|
||||
utf16_to_utf32((u32*)description, current_theme.desc, 0x80);
|
||||
pp2d_draw_wtext_wrap(20, 65, 0.5, 0.5, COLOR_WHITE, 363, description);
|
||||
|
||||
pp2d_draw_wtext(20, 150, 0.6, 0.6, COLOR_WHITE, L"\uE046 Install Shuffle Theme");
|
||||
|
||||
@@ -39,6 +39,7 @@ int init_services(void)
|
||||
{
|
||||
cfguInit();
|
||||
ptmuInit();
|
||||
acInit();
|
||||
httpcInit(0);
|
||||
archive_result = open_archives();
|
||||
homebrew = true;
|
||||
@@ -62,6 +63,7 @@ int exit_services(void)
|
||||
cfguExit();
|
||||
ptmuExit();
|
||||
httpcExit();
|
||||
acExit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -94,7 +96,7 @@ int main(void)
|
||||
int selected_splash = 0;
|
||||
int selected_theme = 0;
|
||||
int previously_selected = 0;
|
||||
int shuffle_theme_count = 0;
|
||||
shuffle_theme_count = 0;
|
||||
bool preview_mode = false;
|
||||
|
||||
while(aptMainLoop())
|
||||
@@ -137,10 +139,18 @@ int main(void)
|
||||
if (preview_mode) {
|
||||
continue;
|
||||
} else {
|
||||
qr_mode = !qr_mode;
|
||||
if (qr_mode) init_qr();
|
||||
else exit_qr();
|
||||
continue;
|
||||
u32 out;
|
||||
ACU_GetWifiStatus(&out);
|
||||
if (out)
|
||||
{
|
||||
qr_mode = !qr_mode;
|
||||
if (qr_mode) init_qr();
|
||||
else exit_qr();
|
||||
continue;
|
||||
} else {
|
||||
throw_error("Please connect to Wi-Fi before scanning QR", WARNING);
|
||||
continue;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -200,7 +210,11 @@ int main(void)
|
||||
draw_theme_install(SINGLE_INSTALL);
|
||||
single_install(*current_theme);
|
||||
}
|
||||
//these two are here just so I don't forget how to implement them - HM
|
||||
//these are here just so I don't forget how to implement them - HM
|
||||
//if (current_theme->in_shuffle) {
|
||||
// shuffle_theme_count--;
|
||||
// current_theme->in_shuffle = false;
|
||||
//}
|
||||
//del_theme(current_theme->path);
|
||||
//get_themes(&themes_list, &theme_count);
|
||||
}
|
||||
|
||||
@@ -152,6 +152,7 @@ static void parse_smdh(Theme_s *theme, ssize_t textureID, u16 *dir_name)
|
||||
|
||||
Result get_themes(Theme_s **themes_list, int *theme_count)
|
||||
{
|
||||
shuffle_theme_count = 0;
|
||||
Result res = 0;
|
||||
Handle dir_handle;
|
||||
res = FSUSER_OpenDirectory(&dir_handle, ArchiveSD, fsMakePath(PATH_ASCII, THEMES_PATH));
|
||||
|
||||
Reference in New Issue
Block a user