miijs 1.5.5 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/README.md +0 -2
  2. package/index.js +3 -3
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -30,7 +30,5 @@ Here is a list of discrepancies this function attempts to handle.
30
30
  - The 3DS has an extra page of eye types that the Wii does not, which the function maps to a similar eye type that the Wii does support if used. Will likely require a manual edit.
31
31
  - The 3DS has two extra mustaches and two extra beards. These are mapped to a similar beard or mustache if used - the two extra beards will likely need a manual change if used.
32
32
 
33
-
34
-
35
33
  # Credits
36
34
  - [kazuki-4ys' MiiInfoEditorCTR](https://github.com/kazuki-4ys/kazuki-4ys.github.io/tree/master/web_apps/MiiInfoEditorCTR), I took the code for how to decrypt and reencrypt the QR codes from here, including the asmCrypto.js file (with some slight modifications to work in my coding style). I believe I also modified the code for rendering the Mii using Nintendo's Mii Studio from here as well.
package/index.js CHANGED
@@ -798,7 +798,7 @@ module.exports={
798
798
  miiJson.glasses.col=glassesCols3DS[parseInt(temp.slice(1,4),2)];
799
799
  temp2=getBinaryFromAddress(0x45);
800
800
  miiJson.glasses.size=parseInt(temp2.slice(5,8)+temp[0],2);
801
- miiJson.glasses.yPos=parseInt(temp2.slice(1,5),2);
801
+ miiJson.glasses.yPos=parseInt(temp2.slice(0,5),2);
802
802
  temp=getBinaryFromAddress(0x46);
803
803
  miiJson.mole.on=temp[7]==="0"?false:true;
804
804
  miiJson.mole.size=parseInt(temp.slice(3,7),2);
@@ -948,10 +948,10 @@ module.exports={
948
948
  miiBin+="1000101011010010000001101000011100011000110001100100011001100110010101100111111110111100000001110101110001000101011101100000001110100100010000000000000000000000".slice(0,8*8);
949
949
  miiBin+=mii.info.type==="Special"?"0":"1";
950
950
  miiBin+="0000000";
951
- for(var i=0;i<4;i++){
951
+ for(var i=0;i<3;i++){
952
952
  miiBin+=Math.floor(Math.random()*255).toString(2).padStart(8,"0");
953
953
  }
954
- miiBin+="01000101011101100000001110100100010000000000000000000000";
954
+ miiBin+="0000000001000101011101100000001110100100010000000000000000000000";
955
955
  miiBin+=mii.info.birthday.toString(2).padStart(5,"0").slice(2,5);
956
956
  miiBin+=mii.info.birthMonth.toString(2).padStart(4,"0");
957
957
  miiBin+=mii.info.gender==="Male"?"0":"1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "miijs",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "description": "Read, Edit, Write, and make Special Miis from a Wiimote binary file or 3DS QR Code to a binary file or QR code",
5
5
  "main": "index.js",
6
6
  "scripts": {