Skip to content

Commit

Permalink
Merge pull request #17 from Xpl0itU/configMenu
Browse files Browse the repository at this point in the history
Config menu
  • Loading branch information
Xpl0itU authored Oct 23, 2022
2 parents ed6c9ac + 1322094 commit b16d42d
Show file tree
Hide file tree
Showing 20 changed files with 321 additions and 149 deletions.
1 change: 1 addition & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:
push:
branches:
- refactor
- configMenu

jobs:
build-binary:
Expand Down
3 changes: 3 additions & 0 deletions include/configMenu.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#pragma once

void configMenu();
1 change: 1 addition & 0 deletions include/input.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
typedef enum Button {
PAD_BUTTON_A,
PAD_BUTTON_B,
PAD_BUTTON_X,
PAD_BUTTON_UP,
PAD_BUTTON_DOWN,
PAD_BUTTON_LEFT,
Expand Down
9 changes: 4 additions & 5 deletions include/json.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,10 @@

class Date {
public:
Date(uint32_t high, uint32_t low, uint8_t s) {
highID = high;
lowID = low;
slot = s;
path = stringFormat("sd:/wiiu/backups/%08x%08x/%u/savemiiMeta.json", highID, lowID, slot);
Date(uint32_t high, uint32_t low, uint8_t s) : highID(high),
lowID(low),
slot(s),
path(stringFormat("sd:/wiiu/backups/%08x%08x/%u/savemiiMeta.json", highID, lowID, slot)) {
}
std::string get();
bool set(std::string date);
Expand Down
2 changes: 2 additions & 0 deletions include/language.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#pragma once

#include <romfs-wiiu.h>
#include <string>
#include <wut_types.h>

#include <coreinit/memdefaultheap.h>
Expand All @@ -26,6 +27,7 @@ typedef enum {
} Swkbd_LanguageType;

void loadLanguage(Swkbd_LanguageType language) __attribute__((cold));
std::string getLoadedLanguage();
Swkbd_LanguageType getSystemLanguage() __attribute__((cold));
bool gettextLoadLanguage(const char *langFile);
void gettextCleanUp() __attribute__((__cold__));
Expand Down
1 change: 1 addition & 0 deletions include/log_freetype.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
#endif

bool WHBLogFreetypeInit() __attribute__((cold));
bool setFont(OSSharedDataType font);
void WHBLogFreetypeFree() __attribute__((cold));
void drawPixel(int32_t x, int32_t y, uint8_t r, uint8_t g, uint8_t b, uint8_t a);
void ttfFontColor32(uint32_t color);
Expand Down
7 changes: 6 additions & 1 deletion include/savemng.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,12 @@
#include <mocha/disc_interface.h>
#include <mocha/mocha.h>

#define PATH_SIZE 0x400
#define PATH_SIZE 0x400

#define VERSION_MAJOR 1
#define VERSION_MINOR 4
#define VERSION_MICRO 9
#define M_OFF 1

typedef struct {
uint32_t highID;
Expand Down
2 changes: 1 addition & 1 deletion languages/SChinese.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
" Wii U Save Management (%u Title%s)": " Wii U保存数据管理(%u 软件%s)",
" vWii Save Management (%u Title%s)": " vWii保存数据管理(%u 软件%s)",
" Batch Backup": " 批量备份",
"\ue000: Select Mode": "\ue000:选择模式",
"\uE002: Options \ue000: Select Mode": "\uE002:选项 \ue000:选择模式",
" Backup All (%u Title%s)": " 备份所有保存数据(%u 软件%s)",
" Backup Wii U (%u Title%s)": " 备份Wii U软件的保存数据(%u 软件%s)",
" Backup vWii (%u Title%s)": " 备份vWii软件的保存数据(%u 软件%s)",
Expand Down
4 changes: 2 additions & 2 deletions languages/TChinese.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
" Wii U Save Management (%u Title%s)": " Wii U保存資料管理(%u軟體%s)",
" vWii Save Management (%u Title%s)": " vWii保存資料管理(%u軟體%s)",
" Batch Backup": " 批量備份",
"\ue000: Select Mode": "\ue000:選擇模式",
"\uE002: Options \ue000: Select Mode": "\uE002:選項 \ue000:選擇模式",
" Backup All (%u Title%s)": " 全部備份(%u 標題%s)",
" Backup Wii U (%u Title%s)": " 備份Wii U軟體(%u Title%s)",
" Backup vWii (%u Title%s)": " 備份vWii軟體(%u軟體%s)",
Expand Down Expand Up @@ -95,4 +95,4 @@
"Failed to delete user folder.\n%s": "無法刪除使用者資料夾。\n%s",
"Failed to import savedata from loadiine.": "無法從loadiine導入保存數據。",
"Failed to export savedata to loadiine.": "無法導出保存數據到Loadiine。"
}
}
192 changes: 96 additions & 96 deletions languages/english.json
Original file line number Diff line number Diff line change
@@ -1,98 +1,98 @@
{
"Disclaimer:": "",
"There is always the potential for a brick.": "",
"Everything you do with this software is your own responsibility": "",
"Out of memory.": "",
"Loaded %i Wii U titles.": "",
"%s%s (No banner.bin)": "",
"Loaded %i Wii titles.": "",
"None": "",
"Name": "",
"Storage": "",
"Storage+Name": "",
"initFS failed. Please make sure your MochaPayload is up-to-date": "",
" Wii U Save Management (%u Title%s)": "",
" vWii Save Management (%u Title%s)": "",
" Batch Backup": "",
"\ue000: Select Mode": "",
" Backup All (%u Title%s)": "",
" Backup Wii U (%u Title%s)": "",
" Backup vWii (%u Title%s)": "",
"\ue000: Backup \ue001: Back": "",
"%s Sort: %s \ue084": "",
" [Not Init]": "",
"\ue000: Select Game \ue001: Back": "",
" Backup savedata": "",
" Restore savedata": "",
" Wipe savedata": "",
" Import from loadiine": "",
" Export to loadiine": "",
" Copy Savedata to Title in %s": "",
"\ue000: Select Task \ue001: Back": "",
"Destination:": "",
"Select %s:": "",
"version": "",
"Delete from:": "",
"slot": "",
"Empty": "",
"Used": "",
"Select SD user to copy from:": "",
"all users": "",
"Has Save": "",
"Select Wii U user to delete from:": "",
"Select Wii U user%s:": "",
" to copy from": "",
" to copy to": "",
"Date: %s": "",
"Include 'common' save?": "",
"yes": "",
"no ": "",
"No 'common' save found.": "",
"\ue000: Restore \ue001: Back": "",
"\ue000: Wipe \ue001: Back": "",
"\ue000: Import \ue001: Back": "",
"\ue000: Export \ue001: Back": "",
"\ue000: Copy \ue001: Back": "",
"Press \ue044 to exit.": "",
"No Wii U titles found.": "",
"No vWii saves found.": "",
"CBHC save. Could be dangerous to modify. Continue?": "",
"Are you REALLY sure?": "",
"vWii saves are in the vWii section. Continue?": "",
"Recommended to run Game at least one time. Continue?": "",
"No save to Backup.": "",
"No save to Wipe.": "",
"No save to Export.": "",
"No save to Copy.": "",
"Copying file: %s": "",
"From: %s": "",
"To: %s": "",
"\ue000 Yes - \ue001 No": "",
"\ue000 Confirm - \ue001 Cancel": "",
"Filesize: %d bytes": "",
"Deleting folder %s": "",
"From: \n%s": "",
"Failed to delete folder %s\n%s": "",
"Deleting file %s": "",
"Failed to delete file %s\n%s": "",
"Loadiine game folder not found.": "",
"Failed to open Loadiine game save directory.": "",
"Are you sure?": "",
"Backup current savedata first to next empty slot?": "",
"Backup done. Now copying Savedata.": "",
"Common save not found.": "",
"Copy failed.": "",
"Backup failed.": "",
"Backup found on this slot. Overwrite it?": "",
"No save found for this user.": "",
"Backup failed. DO NOT restore from this slot.": "",
"No backup found on selected slot.": "",
"Restore failed.": "",
"Hm, are you REALLY sure?": "",
"Backup current savedata first?": "",
"Failed to delete common folder.\n%s": "",
"Failed to delete savefile.": "",
"Failed to delete user folder.\n%s": "",
"Failed to import savedata from loadiine.": "",
"Failed to export savedata to loadiine.": ""
"Disclaimer:": "Disclaimer:",
"There is always the potential for a brick.": "There is always the potential for a brick.",
"Everything you do with this software is your own responsibility": "Everything you do with this software is your own responsibility",
"Out of memory.": "Out of memory.",
"Loaded %i Wii U titles.": "Loaded %i Wii U titles.",
"%s%s (No banner.bin)": "%s%s (No banner.bin)",
"Loaded %i Wii titles.": "Loaded %i Wii titles.",
"None": "None",
"Name": "Name",
"Storage": "Storage",
"Storage+Name": "Storage+Name",
"initFS failed. Please make sure your MochaPayload is up-to-date": "initFS failed. Please make sure your MochaPayload is up-to-date",
" Wii U Save Management (%u Title%s)": " Wii U Save Management (%u Title%s)",
" vWii Save Management (%u Title%s)": " vWii Save Management (%u Title%s)",
" Batch Backup": " Batch Backup",
"\uE002: Options \ue000: Select Mode": "\uE002: Options \ue000: Select Mode",
" Backup All (%u Title%s)": " Backup All (%u Title%s)",
" Backup Wii U (%u Title%s)": " Backup Wii U (%u Title%s)",
" Backup vWii (%u Title%s)": " Backup vWii (%u Title%s)",
"\ue000: Backup \ue001: Back": "\ue000: Backup \ue001: Back",
"%s Sort: %s \ue084": "%s Sort: %s \ue084",
" [Not Init]": " [Not Init]",
"\ue000: Select Game \ue001: Back": "\ue000: Select Game \ue001: Back",
" Backup savedata": " Backup savedata",
" Restore savedata": " Restore savedata",
" Wipe savedata": " Wipe savedata",
" Import from loadiine": " Import from loadiine",
" Export to loadiine": " Export to loadiine",
" Copy Savedata to Title in %s": " Copy Savedata to Title in %s",
"\ue000: Select Task \ue001: Back": "\ue000: Select Task \ue001: Back",
"Destination:": "Destination:",
"Select %s:": "Select %s:",
"version": "version",
"Delete from:": "Delete from:",
"slot": "slot",
"Empty": "Empty",
"Used": "Used",
"Select SD user to copy from:": "Select SD user to copy from:",
"all users": "all users",
"Has Save": "Has Save",
"Select Wii U user to delete from:": "Select Wii U user to delete from:",
"Select Wii U user%s:": "Select Wii U user%s:",
" to copy from": " to copy from",
" to copy to": " to copy to",
"Date: %s": "Date: %s",
"Include 'common' save?": "Include 'common' save?",
"yes": "yes",
"no ": "no ",
"No 'common' save found.": "No 'common' save found.",
"\ue000: Restore \ue001: Back": "\ue000: Restore \ue001: Back",
"\ue000: Wipe \ue001: Back": "\ue000: Wipe \ue001: Back",
"\ue000: Import \ue001: Back": "\ue000: Import \ue001: Back",
"\ue000: Export \ue001: Back": "\ue000: Export \ue001: Back",
"\ue000: Copy \ue001: Back": "\ue000: Copy \ue001: Back",
"Press \ue044 to exit.": "Press \ue044 to exit.",
"No Wii U titles found.": "No Wii U titles found.",
"No vWii saves found.": "No vWii saves found.",
"CBHC save. Could be dangerous to modify. Continue?": "CBHC save. Could be dangerous to modify. Continue?",
"Are you REALLY sure?": "Are you REALLY sure?",
"vWii saves are in the vWii section. Continue?": "vWii saves are in the vWii section. Continue?",
"Recommended to run Game at least one time. Continue?": "Recommended to run Game at least one time. Continue?",
"No save to Backup.": "No save to Backup.",
"No save to Wipe.": "No save to Wipe.",
"No save to Export.": "No save to Export.",
"No save to Copy.": "No save to Copy.",
"Copying file: %s": "Copying file: %s",
"From: %s": "From: %s",
"To: %s": "To: %s",
"\ue000 Yes - \ue001 No": "\ue000 Yes - \ue001 No",
"\ue000 Confirm - \ue001 Cancel": "\ue000 Confirm - \ue001 Cancel",
"Filesize: %d bytes": "Filesize: %d bytes",
"Deleting folder %s": "Deleting folder %s",
"From: \n%s": "From: \n%s",
"Failed to delete folder %s\n%s": "Failed to delete folder %s\n%s",
"Deleting file %s": "Deleting file %s",
"Failed to delete file %s\n%s": "Failed to delete file %s\n%s",
"Loadiine game folder not found.": "Loadiine game folder not found.",
"Failed to open Loadiine game save directory.": "Failed to open Loadiine game save directory.",
"Are you sure?": "Are you sure?",
"Backup current savedata first to next empty slot?": "Backup current savedata first to next empty slot?",
"Backup done. Now copying Savedata.": "Backup done. Now copying Savedata.",
"Common save not found.": "Common save not found.",
"Copy failed.": "Copy failed.",
"Backup failed.": "Backup failed.",
"Backup found on this slot. Overwrite it?": "Backup found on this slot. Overwrite it?",
"No save found for this user.": "No save found for this user.",
"Backup failed. DO NOT restore from this slot.": "Backup failed. DO NOT restore from this slot.",
"No backup found on selected slot.": "No backup found on selected slot.",
"Restore failed.": "Restore failed.",
"Hm, are you REALLY sure?": "Hm, are you REALLY sure?",
"Backup current savedata first?": "Backup current savedata first?",
"Failed to delete common folder.\n%s": "Failed to delete common folder.\n%s",
"Failed to delete savefile.": "Failed to delete savefile.",
"Failed to delete user folder.\n%s": "Failed to delete user folder.\n%s",
"Failed to import savedata from loadiine.": "Failed to import savedata from loadiine.",
"Failed to export savedata to loadiine.": "Failed to export savedata to loadiine."
}
28 changes: 14 additions & 14 deletions languages/italian.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,14 @@
" Wii U Save Management (%u Title%s)": " Gestione di salvataggio Wii U (%u Titolo%s)",
" vWii Save Management (%u Title%s)": " gestione di salvataggio vWii (%u Titolo%s)",
" Batch Backup": " Backup Batch",
"\ue000: Select Mode": "\ue000: Seleziona La Modalità",
"\uE002: Options \ue000: Select Mode": "\uE002: Opzioni \ue000: Seleziona La Modalità",
" Backup All (%u Title%s)": " Backup di tutto (%u titolo%s)",
" Backup Wii U (%u Title%s)": " Backup Wii U (%u Titolo%s)",
" Backup vWii (%u Title%s)": " Backup vWii (%u Titolo%s)",
"\ue000: Backup \ue001: Back": "\ue000: Backup <unk>: Indietro",
"\ue000: Backup \ue001: Back": "\ue000: Backup \ue001: Indietro",
"%s Sort: %s \ue084": "%s Ordinamento: %s \ue084",
" [Not Init]": " [Non Init]",
"\ue000: Select Game \ue001: Back": "\ue000: Seleziona Partita \ue001:Indietro",
"\ue000: Select Game \ue001: Back": "\ue000: Seleziona Partita \ue001: Indietro",
" Backup savedata": " Backup salvataggio",
" Restore savedata": " Ripristina salvataggio",
" Wipe savedata": " Pulisci salvataggio",
Expand All @@ -44,15 +44,15 @@
" to copy from": " per copiare da",
" to copy to": " per copiare su",
"Date: %s": "Data: %s",
"Include 'common' save?": "Includi salvataggio 'comuni'?",
"Include 'common' save?": "Includi salvataggio 'common'?",
"yes": "",
"no ": "no ",
"No 'common' save found.": "Nessun salvataggio 'comune' trovato.",
"\ue000: Restore \ue001: Back": "\ue000: Ripristina \ue001: Indietro",
"\ue000: Wipe \ue001: Back": "\ue000: Pulire \ue001:Indietro",
"\ue000: Import \ue001: Back": "\ue000: Importa \ue001:Indietro",
"\ue000: Export \ue001: Back": "\ue000: Esporta \ue001:Indietro",
"\ue000: Copy \ue001: Back": "\ue000: Copia \ue001:Indietro",
"\ue000: Wipe \ue001: Back": "\ue000: Pulire \ue001: Indietro",
"\ue000: Import \ue001: Back": "\ue000: Importa \ue001: Indietro",
"\ue000: Export \ue001: Back": "\ue000: Esporta \ue001: Indietro",
"\ue000: Copy \ue001: Back": "\ue000: Copia \ue001: Indietro",
"Press \ue044 to exit.": "Premi \ue044 per uscire.",
"No Wii U titles found.": "Nessun titolo Wii U trovato.",
"No vWii saves found.": "Nessun salvataggio vWii trovato.",
Expand All @@ -70,11 +70,11 @@
"\ue000 Yes - \ue001 No": "\ue000 Sì - \ue001 No",
"\ue000 Confirm - \ue001 Cancel": "\ue000 Conferma - \ue001 Annulla",
"Filesize: %d bytes": "Dimensione file: %d byte",
"Deleting folder %s": "Eliminazione cartella '%s'",
"From: \n%s": "Da: %s",
"Failed to delete folder %s\n%s": "Non è stato possibile eliminare il file %s %s",
"Deleting file %s": "Eliminazione cartella '%s'",
"Failed to delete file %s\n%s": "Non è stato possibile eliminare il file %s %s",
"Deleting folder %s": "Eliminazione cartella %s",
"From: \n%s": "Da: \n%s",
"Failed to delete folder %s\n%s": "Non è stato possibile eliminare il file %s\n%s",
"Deleting file %s": "Eliminazione cartella %s",
"Failed to delete file %s\n%s": "Non è stato possibile eliminare il file %s\n%s",
"Loadiine game folder not found.": "Cartella di gioco Loadiine non trovata.",
"Failed to open Loadiine game save directory.": "Apertura della directory di salvataggio del gioco Loadiine non riuscita.",
"Are you sure?": "Sei sicuro?",
Expand All @@ -92,7 +92,7 @@
"Backup current savedata first?": "Salvare prima il salvataggio corrente?",
"Failed to delete common folder.\n%s": "Impossibile eliminare la cartella comune.\n%s",
"Failed to delete savefile.": "Non è stato possibile eliminare il salvataggio.",
"Failed to delete user folder.\n%s": "Impossibile eliminare la cartella. %s",
"Failed to delete user folder.\n%s": "Impossibile eliminare la cartella.\n%s",
"Failed to import savedata from loadiine.": "Impossibile importare salvataggi da loadiine.",
"Failed to export savedata to loadiine.": "Impossibile importare salvataggi da loadiine."
}
Loading

0 comments on commit b16d42d

Please sign in to comment.