public static ConvertBase10To26 ( int n ) : string | ||
n | int | |
Результат | string |
public static void DrawTitleScreenChanges(Patch p, int seed, bool isTourney) { // Draw version number System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(RandomMM2)); string version = assembly.GetName().Version.ToString(); for (int i = 0; i < version.Length; i++) { byte value = TitleChars.GetChar(version[i]).ID; p.Add(0x0373C7 + i, value, "Title Screen Version Number"); } // Draw seed string seedAlpha = SeedConvert.ConvertBase10To26(seed); for (int i = 0; i < seedAlpha.Length; i++) { char ch = seedAlpha.ElementAt(i); byte charIndex = (byte)(Convert.ToByte(ch) - Convert.ToByte('A')); // 'A' starts at C1 in the pattern table p.Add(0x037387 + i, (byte)(0xC1 + charIndex), "Title Screen Seed"); } // Draw flags // Draw tournament mode if (isTourney) { // 0x037367 = Start of row beneath "seed" string flagsAlpha = "TOURNAMENT"; for (int i = 0; i < flagsAlpha.Length; i++) { char ch = flagsAlpha.ElementAt(i); byte charIndex = (byte)(Convert.ToByte(ch) - Convert.ToByte('A')); p.Add(0x037564 + i, (byte)(0xC1 + charIndex), "Title Screen Tournament Text"); } string flags2Alpha = "MODE"; for (int i = 0; i < flags2Alpha.Length; i++) { char ch = flags2Alpha.ElementAt(i); byte charIndex = (byte)(Convert.ToByte(ch) - Convert.ToByte('A')); p.Add(0x03756F + i, (byte)(0xC1 + charIndex), "Title Screen Tournament Text"); } // Draw Hash symbols // Use $B8-$BF with custom gfx, previously unused tiles after converting from MM2U to RM2 //p.Add(0x037367, (byte)(0xB0), "Title Screen Flags"); //p.Add(0x037368, (byte)(0xB1), "Title Screen Flags"); //p.Add(0x037369, (byte)(0xB2), "Title Screen Flags"); //p.Add(0x03736A, (byte)(0xB3), "Title Screen Flags"); } }
public static void DrawTitleScreenChanges(Patch p, int seed) { // Draw version number System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(RandomMM2)); string version = assembly.GetName().Version.ToString(); for (int i = 0; i < version.Length; i++) { byte value = TitleChars.GetChar(version[i]).ID; p.Add(0x0373C7 + i, value, "Title Screen Version Number"); } // Draw seed string seedAlpha = SeedConvert.ConvertBase10To26(seed); for (int i = 0; i < seedAlpha.Length; i++) { char ch = seedAlpha.ElementAt(i); byte charIndex = (byte)(Convert.ToByte(ch) - Convert.ToByte('A')); // 'A' starts at C1 in the pattern table p.Add(0x037387 + i, (byte)(0xC1 + charIndex), "Title Screen Seed"); } }
public static void DrawTitleScreenChanges(Patch p, int seed, RandoSettings settings) { // Adjust cursor positions p.Add(0x0362D4, 0x90, "Title screen Cursor top position"); // default 0x98 p.Add(0x0362D5, 0xA0, "Title screen Cursor bottom position"); // default 0xA8 // Draw version number System.Reflection.Assembly assembly = System.Reflection.Assembly.GetAssembly(typeof(RandomMM2)); string version = assembly.GetName().Version.ToString(); for (int i = 0; i < version.Length; i++) { byte value = RText.IntroCipher[version[i]]; p.Add(0x037407 + i, value, "Title Screen Version Number"); } // Draw seed string seedAlpha = SeedConvert.ConvertBase10To26(seed); for (int i = 0; i < seedAlpha.Length; i++) { byte value = RText.IntroCipher[seedAlpha[i]]; p.Add(0x0373C7 + i, value, "Title Screen Seed"); } // Draw flags string flags = settings.GetFlagsString(); for (int i = 0; i < flags.Length; i++) { byte value = RText.IntroCipher[flags[i]]; if (i < 14) { p.Add(0x037387 + i, value, $"Title Screen Flags: {flags[i]}"); } else { p.Add(0x037367 + i - 14, value, $"Title Screen Flags: {flags[i]}"); } } // Draw tournament mode/spoiler free information if (settings.IsSpoilerFree) { // 0x037367 = Start of row beneath "seed" string flagsAlpha = "TOURNAMENT"; for (int i = 0; i < flagsAlpha.Length; i++) { char ch = flagsAlpha.ElementAt(i); byte charIndex = (byte)(Convert.ToByte(ch) - Convert.ToByte('A')); p.Add(0x037564 + i, (byte)(0xC1 + charIndex), "Title Screen Tournament Text"); } string flags2Alpha = "MODE"; for (int i = 0; i < flags2Alpha.Length; i++) { char ch = flags2Alpha.ElementAt(i); byte charIndex = (byte)(Convert.ToByte(ch) - Convert.ToByte('A')); p.Add(0x03756F + i, (byte)(0xC1 + charIndex), "Title Screen Tournament Text"); } // Draw Hash symbols // Use $B8-$BF with custom gfx, previously unused tiles after converting from MM2U to RM2 //p.Add(0x037367, (byte)(0xB0), "Title Screen Flags"); //p.Add(0x037368, (byte)(0xB1), "Title Screen Flags"); //p.Add(0x037369, (byte)(0xB2), "Title Screen Flags"); //p.Add(0x03736A, (byte)(0xB3), "Title Screen Flags"); } }