cybers bit mappings in converter
This commit is contained in:
parent
1d387b5679
commit
a79a5e54c5
2 changed files with 53 additions and 13 deletions
|
@ -17,7 +17,7 @@ This information was sourced from Cheese-E-Pedia, the Showbiz Pizza Cyberstar In
|
|||
| Eyes Right | 7 | 7 | 5 | 1-5 | TB1 9-10 H1 | No |
|
||||
| Head Left | 8 | 8 | 6 | 1-6 | TB1 3-4 H1 | No |
|
||||
| Head Right | 9 | 9 | 7 | 1-7 | TB1 5-6 H1 | No |
|
||||
| Head Up | 10 | 10 | 8 | 1-8 | TB1 7-8 H1 | Yes |
|
||||
| Head Up | 10 | 10 | 8 | 1-8 | TB1 7-8 H1 | No |
|
||||
| Left Arm Up | 11 | 11 | 11 | 1-11 | | |
|
||||
| Left Arm Twist | 12 | 12 | 12 | 1-12 | | |
|
||||
| Left Elbow | 13 | 13 | 13 | 1-13 | | |
|
||||
|
@ -46,7 +46,7 @@ Earl's movements were removed during Concept Unification.
|
|||
| Eyes Right | 7 | 29 | 184 | 2-34 | TB1 9-10 H5 | No |
|
||||
| Head Left | 8 | 30 | 178 | 2-28 | TB1 3-4 H5 | No |
|
||||
| Head Right | 9 | 31 | 179 | 2-29 | TB1 5-6 H5 | No |
|
||||
| Head Up | 10 | 32 | 180 | 2-30 | TB1 7-8 H5 | Yes |
|
||||
| Head Up | 10 | 32 | 180 | 2-30 | TB1 7-8 H5 | No |
|
||||
| Left Arm Up | 11 | 33 | 173 | 2-23 | | |
|
||||
| Left Arm Twist | 12 | 34 | 175 | 2-25 | | |
|
||||
| Left Elbow | 13 | 35 | 174 | 2-24 | | |
|
||||
|
@ -92,7 +92,7 @@ No movements were removed during Concept Unification.
|
|||
| Eyes Cross | 4 | 61 | 153 | 2-3 | | |
|
||||
| Head Left | 5 | 62 | 156 | 2-6 | TB1 3-4 H2 & TB1 15-16 H2 | No |
|
||||
| Head Right | 6 | 63 | 157 | 2-7 | TB1 5-6 H2 & TB1 9-10 H2 | No |
|
||||
| Head Up | 7 | 64 | 158 | 2-8 | TB1 7-8 H2 | Yes |
|
||||
| Head Up | 7 | 64 | 158 | 2-8 | TB1 7-8 H2 | No |
|
||||
| Right Arm Raise | 8 | 65 | 161 | 2-11 | | |
|
||||
| Right Arm Twist | 9 | 66 | 162 | 2-12 | | |
|
||||
| Right Elbow | 10 | 67 | 163 | 2-13 | TB1 13-14 H2 | No |
|
||||
|
|
|
@ -32,7 +32,7 @@ namespace PC2Converter
|
|||
string[] CyberCharacters = { "Chuck E.", "Helen/Guest Star", "Munch", "Jasper", "Pasqually" };
|
||||
string[] StudioCCharacters = { "Chuck E." };
|
||||
|
||||
int[][] SC_CyberBitMapR12 =
|
||||
int[][] SC_CyberBitMap =
|
||||
{
|
||||
/* chuck */ new int[]{ 1, 2, 3, 4, 8, 5, 6, 7 },
|
||||
/* helen */ new int[]{ 65, 66, 67, 68, 72, 69, 70, 71 },
|
||||
|
@ -85,9 +85,41 @@ namespace PC2Converter
|
|||
};
|
||||
|
||||
int[] CyberRosettaInvertedBits = { 2, 8, 181, 169, 41, 59, 58, 151, 158, 26, 35, 31 };
|
||||
int[] FS_CyberBitMap = {
|
||||
1, 2, 3, 4, 8, 5, 6, 7,
|
||||
65, 66, 67, 68, 72, 69, 70, 71,
|
||||
49, 50, 51, 56, 53, 54, 55, 52,
|
||||
17, 18, 19, 20, 24, 21, 22, 23,
|
||||
33, 34, 35, 40, 37, 38, 39, 36,
|
||||
9, 46, 62, 10, 74, 75, 76, 77, 78,
|
||||
104, 102, 109, 107, 100, 123, 41,
|
||||
27, 28, 29, 30, 25, 26, 57, 58,
|
||||
120, 116, 127, 118, 117, 119,
|
||||
114, 113, 115,
|
||||
110, 108, 101, 106, 111,
|
||||
103, 105, 125, 121, 126, 99, 124, 122, 97, 98
|
||||
};
|
||||
|
||||
int[] FS_CyberBitMapRosetta = {
|
||||
1, 6, 7, 8, 4, 5, 2, 19,
|
||||
185, 178, 179, 180, 183, 184, 181, 169,
|
||||
45, 54, 55, 43, 44, 41, 58, 59,
|
||||
166, 156, 157, 158, 156, 157, 151, 163,
|
||||
30, 25, 21, 28, 29, 26, 31, 35,
|
||||
0, 0, 0, 49, 0, 0, 0, 0, 0,
|
||||
88, 86, 85, 82, 84, 81, 0,
|
||||
93, 94, 91, 92, 91, 92, 0, 0,
|
||||
229, 228, 226, 224, 223, 221,
|
||||
235, 232, 234,
|
||||
67, 68, 71, 72, 73,
|
||||
220, 244, 245, 225, 77, 241, 240, 87, 222, 0
|
||||
};
|
||||
|
||||
int[] CyberRosettaInvertedBits = { 2, 181, 41, 59, 58, 151, 163, 26, 35, 31 };
|
||||
int[] RAE3stAPSDescrambleTable = { 10, 11, 0, 1, 2, 3, 4, 12, 13, 5, 6, 7, 8, 9, 14, 15};
|
||||
|
||||
bool FullStage = false;
|
||||
bool Rosetta = false;
|
||||
const int USTVersion = 1;
|
||||
|
||||
public MainForm()
|
||||
|
@ -260,6 +292,7 @@ namespace PC2Converter
|
|||
CharacterSelector.Items.Add(s);
|
||||
}
|
||||
CharacterSelector.Enabled = true;
|
||||
Rosetta = false;
|
||||
FullStage = false;
|
||||
break;
|
||||
case 1:
|
||||
|
@ -269,16 +302,19 @@ namespace PC2Converter
|
|||
CharacterSelector.Items.Add(s);
|
||||
}
|
||||
CharacterSelector.Enabled = true;
|
||||
Rosetta = true;
|
||||
FullStage = false;
|
||||
break;
|
||||
case 2:
|
||||
CharacterSelector.Items.Clear();
|
||||
CharacterSelector.Enabled = false;
|
||||
Rosetta = false;
|
||||
FullStage = true;
|
||||
break;
|
||||
case 3:
|
||||
CharacterSelector.Items.Clear();
|
||||
CharacterSelector.Enabled = false;
|
||||
Rosetta = true;
|
||||
FullStage = true;
|
||||
break;
|
||||
}
|
||||
|
@ -293,11 +329,13 @@ namespace PC2Converter
|
|||
CharacterSelector.Items.Add(s);
|
||||
}
|
||||
CharacterSelector.Enabled = true;
|
||||
Rosetta = false;
|
||||
FullStage = false;
|
||||
break;
|
||||
case 1:
|
||||
CharacterSelector.Items.Clear();
|
||||
CharacterSelector.Enabled = false;
|
||||
Rosetta = false;
|
||||
FullStage = true;
|
||||
break;
|
||||
}
|
||||
|
@ -312,11 +350,13 @@ namespace PC2Converter
|
|||
CharacterSelector.Items.Add(s);
|
||||
}
|
||||
CharacterSelector.Enabled = true;
|
||||
Rosetta = false;
|
||||
FullStage = false;
|
||||
break;
|
||||
case 1:
|
||||
CharacterSelector.Items.Clear();
|
||||
CharacterSelector.Enabled = false;
|
||||
Rosetta = false;
|
||||
FullStage = true;
|
||||
break;
|
||||
}
|
||||
|
@ -365,12 +405,6 @@ namespace PC2Converter
|
|||
return;
|
||||
}
|
||||
|
||||
if (FullStage && (string)OutputTypeSelector.SelectedKey != "UST 256 Bits (Full RAE/3st)")
|
||||
{
|
||||
MessageBox.Show("Fatal: Full Stage mode is not supported for cybers and studio c at this time.");
|
||||
return;
|
||||
}
|
||||
|
||||
SaveFileDialog fileDialog = new SaveFileDialog();
|
||||
fileDialog.Filters.Add(new FileFilter("UST Files (.ust)", new string[]{".ust"}));
|
||||
fileDialog.Title = "Select Show File.";
|
||||
|
@ -440,13 +474,15 @@ namespace PC2Converter
|
|||
break;
|
||||
case "UST 256 Bits (Full Cybers Rosetta)":
|
||||
bitsCount = 256;
|
||||
targetBits = FS_CyberBitMapRosetta;
|
||||
break;
|
||||
case "UST 8 Bits (Single Bot Cybers)":
|
||||
bitsCount = 8;
|
||||
targetBits = SC_CyberBitMapR12[Array.IndexOf(CyberCharacters, CharacterSelector.SelectedKey)];
|
||||
targetBits = SC_CyberBitMap[Array.IndexOf(CyberCharacters, CharacterSelector.SelectedKey)];
|
||||
break;
|
||||
case "UST 256 Bits (Full Cybers)":
|
||||
bitsCount = 256;
|
||||
targetBits = FS_CyberBitMap;
|
||||
break;
|
||||
case "UST 32 Bits (Single Bot Studio C)":
|
||||
bitsCount = 32;
|
||||
|
@ -463,15 +499,19 @@ namespace PC2Converter
|
|||
BigInteger frameByte = 0;
|
||||
for (int i = 0; i < targetBits.Length; i++)
|
||||
{
|
||||
if (bits.Get(targetBits[i])) frameByte += BigInteger.Pow(2, i);
|
||||
if (Rosetta && CyberRosettaInvertedBits.Contains(targetBits[i]))
|
||||
{
|
||||
if (!bits.Get(targetBits[i])) frameByte += BigInteger.Pow(2, i);
|
||||
}
|
||||
else { if (bits.Get(targetBits[i])) frameByte += BigInteger.Pow(2, i); }
|
||||
}
|
||||
writeOut.Add(frameByte.ToString($"X{(bitsCount/4).ToString()}"));
|
||||
}
|
||||
writeOut[0] = (0).ToString($"X{(bitsCount/4).ToString()}");
|
||||
|
||||
byte[] audioOut = file.audioData;
|
||||
if ((bool)CompressAudioCheckBox.Checked)
|
||||
{
|
||||
MessageBox.Show("press ok to start compressing audio");
|
||||
if (File.Exists("tmp.mp3")) File.Delete("tmp.mp3");
|
||||
File.WriteAllBytes("tmp.wav", audioOut);
|
||||
Process ffmpegProcess = new Process();
|
||||
|
|
Loading…
Add table
Reference in a new issue