Skip to content

Commit ca8bd1e

Browse files
Fix Switch Toolbox importing
1 parent a775c16 commit ca8bd1e

File tree

4 files changed

+19
-17
lines changed

4 files changed

+19
-17
lines changed

.vscode/launch.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,12 +11,9 @@
1111
"program": "${workspaceFolder}/bin/miitoumii.exe",
1212
"args": [
1313
"-i",
14-
"Npc_HatenoVillage.jpg",
15-
"-r",
16-
"C:/Users/aehar/Downloads/romfs",
17-
"-p",
18-
"C:/Users/aehar/Downloads/mod",
19-
"-x"
14+
"https://images-wixmp-ed30a86b8c4ca887773594c2.wixmp.com/f/794b41f3-df19-4dcf-8e17-aa1ea362d0ca/d8ox3vz-dc09f6b8-fe73-454a-987c-66cf2098f2ed.jpg?token=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1cm46YXBwOiIsImlzcyI6InVybjphcHA6Iiwib2JqIjpbW3sicGF0aCI6IlwvZlwvNzk0YjQxZjMtZGYxOS00ZGNmLThlMTctYWExZWEzNjJkMGNhXC9kOG94M3Z6LWRjMDlmNmI4LWZlNzMtNDU0YS05ODdjLTY2Y2YyMDk4ZjJlZC5qcGcifV1dLCJhdWQiOlsidXJuOnNlcnZpY2U6ZmlsZS5kb3dubG9hZCJdfQ.gzsz7ZewPZuSPvW7mr7ZLrUr3cD2m172zzMTEDGHoMo",
15+
"-x",
16+
"-b"
2017
],
2118
"logging": {
2219
"moduleLoad": true,
@@ -42,7 +39,10 @@
4239
"request": "launch",
4340
"program": "${workspaceFolder}/bin/miitoumii",
4441
"args": [
45-
"-i","https://www.miicharacters.com/miis/qr_thumb/1972_peterg.jpg","-b","-x"
42+
"-i",
43+
"https://www.miicharacters.com/miis/qr_thumb/1972_peterg.jpg",
44+
"-b",
45+
"-x"
4646
],
4747
"logging": {
4848
"moduleLoad": true,

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@
8484
"csignal": "cpp",
8585
"strstream": "cpp",
8686
"charconv": "cpp",
87-
"*.inc": "cpp"
87+
"*.inc": "cpp",
88+
"*.ipp": "cpp"
8889
}
8990
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Usage:
2121
-h, --help Print usage
2222
```
2323

24-
* `input`: The input Mii to convert. Miis for Wii, Wii U, 3DS, Switch and Mii Studio are all supported, as well as Miis from [the online Mii editor here](https://rc24.xyz/goodies/mii/) and QR codes
24+
* `input`: The input Mii to convert. Miis for Wii, Wii U, 3DS, Switch and Mii Studio are all supported, as well as Miis from [the online Mii editor here](https://rc24.xyz/goodies/mii/) and QR codes. URLs are also supported, as well as file wildcards like `*.jpg` to convert all QR codes in a folder
2525
* `output`: The path to the output Mii
2626
* `type`: The type of the input Mii. Either you can leave this blank and have the program guess the type from the extension:
2727
```

src/main.cpp

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ static const std::string programVersion = "0.0.1";
6565
std::string getStringifiedUmii (Mii::MiiInfo& info) {
6666
// clang-format off
6767
return fmt::format(
68-
"!io\n"
69-
"version: 0\n"
68+
"version: 2\n"
69+
"io_version: 0\n"
7070
"type: xml\n"
7171
"param_root: !list\n"
7272
" objects:\n"
@@ -85,8 +85,8 @@ std::string getStringifiedUmii (Mii::MiiInfo& info) {
8585
" head_fav_color: {}\n"
8686
" shoulder_fav_color: {}\n"
8787
" shoulder_sub_color_1: {}\n"
88-
" personality: {}\n"
89-
" voice_type: {}\n"
88+
" personality: !strRef {}\n"
89+
" voice_type: !strRef {}\n"
9090
" common: !obj\n"
9191
" backpack: {}\n"
9292
" hat: {}\n"
@@ -315,10 +315,11 @@ int main (int argc, char* argv[]) {
315315
if (curl) {
316316
FILE* fp = fopen (filename.c_str (), "wb");
317317
curl_easy_setopt (curl, CURLOPT_URL, inputFileString.c_str ());
318-
curl_easy_setopt (curl, CURLOPT_WRITEFUNCTION, +[](void* ptr, size_t size, size_t nmemb, FILE* stream) {
319-
size_t written = fwrite (ptr, size, nmemb, stream);
320-
return written;
321-
});
318+
curl_easy_setopt (
319+
curl, CURLOPT_WRITEFUNCTION, +[] (void* ptr, size_t size, size_t nmemb, FILE* stream) {
320+
size_t written = fwrite (ptr, size, nmemb, stream);
321+
return written;
322+
});
322323
curl_easy_setopt (curl, CURLOPT_WRITEDATA, fp);
323324
curl_easy_setopt (curl, CURLOPT_SSL_VERIFYPEER, 0L);
324325
CURLcode res = curl_easy_perform (curl);

0 commit comments

Comments
 (0)