deggua / Halo-MCC-Map-Tools

Tools for viewing and modifying Halo MCC maps and gamemodes
1 stars 1 forks source link

Ability to read map and game types from multiple games #4

Open William-Quinn-Bentjen opened 3 years ago

William-Quinn-Bentjen commented 3 years ago

This should allow the reading of map and game type variant files from:

This pull request doesn't implement it into the UI because I'm not sure exactly how you would like to implement it. I'm not sure how to determine which game the file is from without user input so you might need a combo box or something to tell what game the file is for. Use the FileInfo class with FileInfo info = new FileInfo("C:\examplePath.mvar" , FileInfo.Game.HaloReach); It will pull the info and you can get the in game name and description with info.InGameName and info.Description

Halo 2 Anniversary map variants are a pain to get the name and description from and require bit shifting which is why I made the BinaryArray class. The BitArray class that comes out of the box will put bytes into the array least significant bit first (right to left) so the BinaryArray class just wraps it and makes puts bytes in most significant bit first (left to right).