Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions Flatpak/io.github.TeamWheelWizard.WheelWizard.metainfo.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,19 +31,19 @@
<screenshots>
<screenshot type="default">
<caption>Wheel Wizard's home page</caption>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d8eb58433cea25d438f4d6fb79bfececd5ccbc73/images/screenshots/home_page.png</image>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d1c065020c1a526d80eb08f53423543f0f5c3439/images/screenshots/home_page.png</image>
</screenshot>
<screenshot>
<caption>Wheel Wizard's room details page</caption>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d8eb58433cea25d438f4d6fb79bfececd5ccbc73/images/screenshots/rooms_page.png</image>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d1c065020c1a526d80eb08f53423543f0f5c3439/images/screenshots/rooms_page.png</image>
</screenshot>
<screenshot>
<caption>Wheel Wizard's profile page</caption>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d8eb58433cea25d438f4d6fb79bfececd5ccbc73/images/screenshots/profile_page.png</image>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d1c065020c1a526d80eb08f53423543f0f5c3439/images/screenshots/profile_page.png</image>
</screenshot>
<screenshot>
<caption>Wheel Wizard's mod browser</caption>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d8eb58433cea25d438f4d6fb79bfececd5ccbc73/images/screenshots/mods_browser.png</image>
<caption>Wheel Wizard's Mii management page</caption>
<image type="source">https://raw.githubusercontent.com/TeamWheelWizard/.github/d1c065020c1a526d80eb08f53423543f0f5c3439/images/screenshots/mii_page.png</image>
</screenshot>
</screenshots>

Expand All @@ -55,6 +55,7 @@
</provides>

<releases>
<release version="2.2.1" date="2025-05-06"/>
<release version="2.1.3" date="2025-04-13"/>
<release version="2.1.0" date="2025-04-11"/>
</releases>
Expand Down
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ Feel free to join our community on [Discord](https://discord.gg/vZ7T2wJnsq) for
<img src="https://github.com/TeamWheelWizard/.github/blob/main/images/screenshots/rooms_page.png" alt="Wheel Wizard Logo" width="450"/>
<img src="https://github.com/TeamWheelWizard/.github/blob/main/images/screenshots/profile_page.png" alt="Wheel Wizard Logo" width="450"/>
<img src="https://github.com/TeamWheelWizard/.github/blob/main/images/screenshots/mods_browser.png" alt="Wheel Wizard Logo" width="450"/>
<img src="https://github.com/TeamWheelWizard/.github/blob/main/images/screenshots/miieditor_page.png" alt="Wheel Wizard Logo" width="450"/>
<img src="https://github.com/TeamWheelWizard/.github/blob/main/images/screenshots/mii_page.png" alt="Wheel Wizard Logo" width="450"/>
</p>
---

Expand Down
14 changes: 7 additions & 7 deletions WheelWizard.Test/Features/MiiDbServiceTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ private OperationResult<Mii> CreateValidMii(uint id = 1, string name = "TestMii"
var weight = MiiScale.Create(50);
var miiFacial = MiiFacialFeatures.Create(MiiFaceShape.Bread, MiiSkinColor.Brown, MiiFacialFeature.Beard, false, false);
var miiHair = MiiHair.Create(1, HairColor.Black, false);
var miiEyebrows = MiiEyebrow.Create(1, 1, EyebrowColor.Black, 1, 1, 1);
var miiEyes = MiiEye.Create(1, 1, 1, EyeColor.Black, 1, 1);
var miiNose = MiiNose.Create(NoseType.Default, 1, 1);
var miiLips = MiiLip.Create(1, LipColor.Pink, 1, 1);
var miiGlasses = MiiGlasses.Create(GlassesType.None, GlassesColor.Blue, 1, 1);
var miiFacialHair = MiiFacialHair.Create(MustacheType.None, BeardType.None, MustacheColor.Black, 1, 1);
var miiMole = MiiMole.Create(true, 1, 1, 1);
var miiEyebrows = MiiEyebrow.Create(3, 3, EyebrowColor.Black, 3, 3, 3);
var miiEyes = MiiEye.Create(3, 3, 3, EyeColor.Black, 3, 3);
var miiNose = MiiNose.Create(NoseType.Default, 3, 3);
var miiLips = MiiLip.Create(3, LipColor.Pink, 3, 3);
var miiGlasses = MiiGlasses.Create(GlassesType.None, GlassesColor.Blue, 3, 3);
var miiFacialHair = MiiFacialHair.Create(MustacheType.None, BeardType.None, MustacheColor.Black, 3, 3);
var miiMole = MiiMole.Create(true, 3, 3, 3);
var creatorName = MiiName.Create("Creator");
var miiFavoriteColor = MiiFavoriteColor.Red;
var EveryResult = new List<OperationResult>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public static IServiceCollection AddAutoUpdating(this IServiceCollection service
implementationType = typeof(WindowsUpdatePlatform);
#elif LINUX
// We can enable this again once the auto updater has been fixed and tested
// implementationType = typeof(LinuxUpdatePlatform);
implementationType = typeof(LinuxUpdatePlatform);
#elif MACOS
// MacOS updater
#endif
Expand Down
1 change: 1 addition & 0 deletions WheelWizard/Features/AutoUpdating/Platforms/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
LinuxUpdatePlatform.cs text eol=lf
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,17 @@ private OperationResult CreateAndRunShellScript(string currentFilePath, string n
sleep 1

echo 'Replacing old executable...'
rm -f "{fileSystem.Path.Combine(currentFolder, originalFileName)}"
mv "{fileSystem.Path.Combine(currentFolder, newFileName)}" "{fileSystem.Path.Combine(currentFolder, originalFileName)}"
chmod +x "{fileSystem.Path.Combine(currentFolder, originalFileName)}"
rm -f {EnvHelper.SingleQuotePath(fileSystem.Path.Combine(currentFolder, originalFileName))}
mv {EnvHelper.SingleQuotePath(fileSystem.Path.Combine(currentFolder, newFileName))} {EnvHelper.SingleQuotePath(
fileSystem.Path.Combine(currentFolder, originalFileName)
)}
chmod +x {EnvHelper.SingleQuotePath(fileSystem.Path.Combine(currentFolder, originalFileName))}

echo 'Starting the updated application...'
nohup "{fileSystem.Path.Combine(currentFolder, originalFileName)}" > /dev/null 2>&1 &
nohup {EnvHelper.SingleQuotePath(fileSystem.Path.Combine(currentFolder, originalFileName))} > /dev/null 2>&1 &

echo 'Cleaning up...'
rm -- "{scriptFilePath}"
rm -- {EnvHelper.SingleQuotePath(scriptFilePath)}

echo 'Update completed successfully.'

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ private OperationResult CreateAndRunPowerShellScript(string currentFilePath, str
Write-Output 'Starting update process...'

# Wait for the original application to exit
while (Get-Process -Name '{{fileSystem.Path.GetFileNameWithoutExtension(originalFileName)}}' -ErrorAction SilentlyContinue) {
while (Get-Process -Name {{EnvHelper.SingleQuotePath(fileSystem.Path.GetFileNameWithoutExtension(originalFileName))}} -ErrorAction SilentlyContinue) {
Write-Output 'Waiting for {{originalFileName}} to exit...'
Start-Sleep -Seconds 1
}
Expand All @@ -129,7 +129,7 @@ private OperationResult CreateAndRunPowerShellScript(string currentFilePath, str

while (-not $deleted -and $retryCount -lt $maxRetries) {
try {
Remove-Item -Path '{{fileSystem.Path.Combine(currentFolder, originalFileName)}}' -Force -ErrorAction Stop
Remove-Item -Path {{EnvHelper.SingleQuotePath(fileSystem.Path.Combine(currentFolder, originalFileName))}} -Force -ErrorAction Stop
$deleted = $true
}
catch {
Expand All @@ -147,10 +147,10 @@ exit 1

Write-Output 'Renaming new executable...'
try {
Rename-Item -Path '{{fileSystem.Path.Combine(
Rename-Item -Path {{EnvHelper.SingleQuotePath(fileSystem.Path.Combine(
currentFolder,
newFileName
)}}' -NewName '{{originalFileName}}' -ErrorAction Stop
))}} -NewName {{EnvHelper.SingleQuotePath(originalFileName)}} -ErrorAction Stop
}
catch {
Write-Output 'Failed to rename {{newFileName}} to {{originalFileName}}. Update aborted.'
Expand All @@ -159,21 +159,21 @@ exit 1
}

Write-Output 'Starting the updated application...'
Start-Process -FilePath '{{fileSystem.Path.Combine(currentFolder, originalFileName)}}'
Start-Process -FilePath {{EnvHelper.SingleQuotePath(fileSystem.Path.Combine(currentFolder, originalFileName))}}

Write-Output 'Cleaning up...'
Remove-Item -Path '{{scriptFilePath}}' -Force
Remove-Item -Path {{EnvHelper.SingleQuotePath(scriptFilePath)}} -Force

Write-Output 'Update completed successfully.'

""";

fileSystem.File.WriteAllText(scriptFilePath, scriptContent);

var processStartInfo = new ProcessStartInfo
{
FileName = "powershell.exe",
Arguments = $"-NoProfile -ExecutionPolicy Bypass -File \"{scriptFilePath}\"",
ArgumentList = { "-NoProfile", "-ExecutionPolicy", "Bypass", "-File", scriptFilePath },
CreateNoWindow = false,
UseShellExecute = false,
WorkingDirectory = currentFolder,
Expand Down
20 changes: 10 additions & 10 deletions WheelWizard/Features/MiiImages/MiiStudioDataSerializer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
// Offsets and logic match the 'else' block (Wii part) of miiFileRead

// --- Basic Info ---
var tmpU16_0 = BigEndianBinaryReader.BufferToUint16(buf, 0);
var tmpU16_0 = BigEndianBinaryReader.ReadUint16(buf, 0);
var isGirl = ((tmpU16_0 >> 14) & 1) == 1;
var favColor = (int)((tmpU16_0 >> 1) & 0xF);
int height = buf[0x16];
Expand All @@ -89,7 +89,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[2] = (byte)weight; // Weight (mapped to index 2 in studio)

// --- Face ---
var tmpU16_20 = BigEndianBinaryReader.BufferToUint16(buf, 0x20);
var tmpU16_20 = BigEndianBinaryReader.ReadUint16(buf, 0x20);
var faceShape = (int)(tmpU16_20 >> 13);
var skinColor = (int)((tmpU16_20 >> 10) & 7);
var facialFeature = (int)((tmpU16_20 >> 6) & 0xF); // Note: JS uses 0xF mask here, map to makeup/wrinkles
Expand All @@ -102,7 +102,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[0x12] = (byte)makeup;

// --- Hair ---
var tmpU16_22 = BigEndianBinaryReader.BufferToUint16(buf, 0x22);
var tmpU16_22 = BigEndianBinaryReader.ReadUint16(buf, 0x22);
var hairStyle = (int)(tmpU16_22 >> 9);
var hairColor = (int)((tmpU16_22 >> 6) & 7);
var flipHair = (int)((tmpU16_22 >> 5) & 1);
Expand All @@ -112,7 +112,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[0x1C] = (byte)flipHair;

// --- Eyebrows ---
var tmpU32_24 = BigEndianBinaryReader.BufferToUint32(buf, 0x24);
var tmpU32_24 = BigEndianBinaryReader.ReadUint32(buf, 0x24);
var eyebrowStyle = (int)(tmpU32_24 >> 27);
var eyebrowRotation = (int)((tmpU32_24 >> 22) & 0xF); // Note: JS uses 0xF mask
var eyebrowColor = (int)((tmpU32_24 >> 13) & 7);
Expand All @@ -130,7 +130,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[0xF] = (byte)eyebrowXSpacing;

// --- Eyes ---
var tmpU32_28 = BigEndianBinaryReader.BufferToUint32(buf, 0x28);
var tmpU32_28 = BigEndianBinaryReader.ReadUint32(buf, 0x28);
var eyeStyle = (int)(tmpU32_28 >> 26);
var eyeRotation = (int)((tmpU32_28 >> 21) & 7); // Note: JS uses 7 (0b111) mask
var eyeYPosition = (int)((tmpU32_28 >> 16) & 0x1F);
Expand All @@ -149,7 +149,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[8] = (byte)eyeXSpacing;

// --- Nose ---
var tmpU16_2C = BigEndianBinaryReader.BufferToUint16(buf, 0x2C);
var tmpU16_2C = BigEndianBinaryReader.ReadUint16(buf, 0x2C);
var noseStyle = (int)(tmpU16_2C >> 12);
var noseScale = (int)((tmpU16_2C >> 8) & 0xF);
var noseYposition = (int)((tmpU16_2C >> 3) & 0x1F);
Expand All @@ -160,7 +160,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[0x2D] = (byte)noseYposition;

// --- Mouth ---
var tmpU16_2E = BigEndianBinaryReader.BufferToUint16(buf, 0x2E);
var tmpU16_2E = BigEndianBinaryReader.ReadUint16(buf, 0x2E);
var mouseStyle = (int)(tmpU16_2E >> 11);
var mouseColor = (int)((tmpU16_2E >> 9) & 3); // Lip color (0-3)
var mouseScale = (int)((tmpU16_2E >> 5) & 0xF);
Expand All @@ -174,7 +174,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[0x27] = (byte)mouseYPosition;

// --- Beard / Mustache ---
var tmpU16_32 = BigEndianBinaryReader.BufferToUint16(buf, 0x32);
var tmpU16_32 = BigEndianBinaryReader.ReadUint16(buf, 0x32);
var mustacheStyle = (int)(tmpU16_32 >> 14);
var beardStyle = (int)((tmpU16_32 >> 12) & 3);
var facialHairColor = (int)((tmpU16_32 >> 9) & 7);
Expand All @@ -188,7 +188,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[0x2A] = (byte)mustacheYPosition;

// --- Glasses ---
var tmpU16_30 = BigEndianBinaryReader.BufferToUint16(buf, 0x30);
var tmpU16_30 = BigEndianBinaryReader.ReadUint16(buf, 0x30);
var glassesStyle = (int)(tmpU16_30 >> 12);
var glassesColor = (int)((tmpU16_30 >> 9) & 7);
var glassesScale = (int)((tmpU16_30 >> 5) & 7); // Note: JS uses 7 mask
Expand All @@ -208,7 +208,7 @@ private static byte[] GenerateStudioDataArray(byte[] buf)
studio[0x1A] = (byte)glassesYPosition;

// --- Mole ---
var tmpU16_34 = BigEndianBinaryReader.BufferToUint16(buf, 0x34);
var tmpU16_34 = BigEndianBinaryReader.ReadUint16(buf, 0x34);
var enableMole = (int)(tmpU16_34 >> 15);
var moleScale = (int)((tmpU16_34 >> 11) & 0xF);
var moleYPosition = (int)((tmpU16_34 >> 6) & 0x1F);
Expand Down
Loading