Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- private void ReplaceMapsHDR(byte players)
- {
- if (Panel4.Visible == false) {
- return;
- }
- string populousin = null;
- populousin = My.Computer.Registry.GetValue("HKEY_LOCAL_MACHINE\\SOFTWARE\\Bullfrog Productions Ltd\\Populous: The Beginning", "InstallPath", "");
- try {
- foreach (string fileFullPath in Directory.GetFiles(populousin + "\\levels")) {
- string file = Path.GetFileName(fileFullPath);
- if (Path.GetExtension(file.ToLower()) == ".hdr") {
- if (file.Replace("levl20", null).Replace(".hdr", null) <= 25 == false) {
- BinaryWriter writer = new BinaryWriter(new FileStream(populousin + "\\levels\\" + file, FileMode.Open));
- writer.BaseStream.Position = 88;
- writer.Write(players);
- writer.Close();
- }
- }
- }
- } catch {
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement