private void WriteFileSelect() { if (cMode.SelectedIndex == 2) { return; } ; ROMFuncs.ApplyHack(ModsDir + "file-select"); byte[] SkyboxDefault = new byte[] { 0x91, 0x78, 0x9B, 0x28, 0x00, 0x28 }; List <int[]> Addrs = ROMFuncs.GetAddresses(AddrsDir + "skybox-init"); Random R = new Random(); int rot = R.Next(360); for (int i = 0; i < 2; i++) { Color c = Color.FromArgb(SkyboxDefault[i * 3], SkyboxDefault[i * 3 + 1], SkyboxDefault[i * 3 + 2]); float h = c.GetHue(); h += rot; h %= 360f; c = ROMFuncs.FromAHSB(c.A, h, c.GetSaturation(), c.GetBrightness()); SkyboxDefault[i * 3] = c.R; SkyboxDefault[i * 3 + 1] = c.G; SkyboxDefault[i * 3 + 2] = c.B; } ; for (int i = 0; i < 3; i++) { ROMFuncs.WriteROMAddr(Addrs[i], new byte[] { SkyboxDefault[i * 2], SkyboxDefault[i * 2 + 1] }); } ; rot = R.Next(360); byte[] FSDefault = new byte[] { 0x64, 0x96, 0xFF, 0x96, 0xFF, 0xFF, 0x64, 0xFF, 0xFF }; Addrs = ROMFuncs.GetAddresses(AddrsDir + "fs-colour"); for (int i = 0; i < 3; i++) { Color c = Color.FromArgb(FSDefault[i * 3], FSDefault[i * 3 + 1], FSDefault[i * 3 + 2]); float h = c.GetHue(); h += rot; h %= 360f; c = ROMFuncs.FromAHSB(c.A, h, c.GetSaturation(), c.GetBrightness()); FSDefault[i * 3] = c.R; FSDefault[i * 3 + 1] = c.G; FSDefault[i * 3 + 2] = c.B; } ; for (int i = 0; i < 9; i++) { if (i < 6) { ROMFuncs.WriteROMAddr(Addrs[i], new byte[] { 0x00, FSDefault[i] }); } else { ROMFuncs.WriteROMAddr(Addrs[i], new byte[] { FSDefault[i] }); }; } ; }