-
-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ManagedBlam Support: New bitmap automatic compression and override settings, migrated janky ShaderGen code to MB #56
Merged
Merged
Changes from all commits
Commits
Show all changes
36 commits
Select commit
Hold shift + click to select a range
34024a5
ManagedBlam bitmap compression initial work - awful method
Pepper-Man 66c38a5
Run ManagedBlam through Osoyoos proof of concept
Pepper-Man 75d5e90
Working prototype for changing bitmap settings
Pepper-Man 4cbfb05
Exclude non-diffuse bitmaps
Pepper-Man 61ed887
Apply settings for diffuse, normal, bump and material textures
Pepper-Man ac4357a
Fix capitalisation
Pepper-Man b09c8d8
Dynamically locate exe from EK. Error messagebox when not found. Only…
Pepper-Man 4539cf9
Fix to enable ODST support
Pepper-Man 2599040
Remove unused library imports, and DLL reference to old version of Ma…
Pepper-Man f9fc645
Migrate Generate Shaders feature over to ManagedBlam. Deleted now unu…
Pepper-Man 1515d67
Remove Creative Commons license info. Update README to .NET6.0 downlo…
Pepper-Man 57755cb
Update LICENSE formatting.md
Pepper-Man 962433d
Add extra debug output
Pepper-Man 54ec148
Merge branch 'master' of https://github.com/Pepper-Man/Osoyoos-Launcher
Pepper-Man d9a6a9b
Reference assembly for ManagedBlam.dll
Pepper-Man ec4ebb7
Reference assembly generated by Refasmer
Pepper-Man 9de63c7
Restore shadergen code/resources to maintain H2 compatibility, includ…
Pepper-Man 5f647f6
Revert shadergen changes to non-managedblam. Removed unnecessary meth…
Pepper-Man c666808
Move bitmap MB code into separate file+class. Separated ManagedBlam c…
Pepper-Man 36d0697
Remove unused list
Pepper-Man 7333e7b
Resolve ambiguous path issue using backport of Path.GetRelativePath. …
Pepper-Man 87ac4ab
Add section to readme about reference assembly
Pepper-Man 456ab7e
Improve handling of compression type enum
Pepper-Man 6588f35
Move getting bitmap path into helper function. Grab EK path more simp…
Pepper-Man 3694a97
Revert ToolkitLauncher.csproj back to current release build
Pepper-Man 1421da8
Initial project merge
Pepper-Man 065008a
Configure correct build info for both projects
Pepper-Man c0b93e4
Fix unsafe code build error
Pepper-Man 11dcf02
Merge pull request #2 from Pepper-Man/single-solution
Pepper-Man b8609e6
Define tag field/block access paths to avoid repeating magic strings
Pepper-Man f1e03f8
Remove old solution file
Pepper-Man fb337bc
Delete .github/workflows/dotnet-5.yml
num0005 968c9e0
Switch to new style SDK for the helper + x64 for all executables.
num0005 d8ac261
test next dotnet versions.
num0005 1f76864
Don't attempt to publish the MB project.
num0005 fdd2797
Use the x64 build path.
num0005 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,14 @@ | ||
*/bin/* | ||
/Launcher/bin/* | ||
*/obj/* | ||
*.vs/* | ||
*.zip | ||
*.exe | ||
*.dll | ||
!/OsoyoosMB/ref/ManagedBlam.dll | ||
!/packages/Resource.Embedder.2.1.1/tasks/net46/*.dll | ||
/icon_assets.7z | ||
/Launcher/Properties/launchSettings.json | ||
/OsoyoosMB/.vs/* | ||
/OsoyoosMB/OsoyoosMB/obj/* | ||
/OsoyoosMB/OsoyoosMB/bin/* | ||
/OsoyoosMB/OsoyoosMB/.vs/* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
using System; | ||
using System.Diagnostics; | ||
using System.IO; | ||
using System.Windows.Forms; | ||
|
||
namespace ToolkitLauncher.Utility | ||
{ | ||
public class ManagedBlam | ||
{ | ||
public static bool RunMBBitmaps(string ek_path, string tag_path, string compression_type) | ||
{ | ||
string exe_path = Path.Combine(ek_path, @"bin\OsoyoosMB.exe"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. arguably this should be a new tool path not just hardcoded, would make it easier when debugging, etc. Could be a future improvement. |
||
|
||
if (File.Exists(exe_path)) | ||
{ | ||
ProcessStartInfo startInfo = new ProcessStartInfo | ||
{ | ||
FileName = exe_path, | ||
Arguments = $"getbitmapdata \"{ek_path}\" \"{tag_path.TrimEnd('\\')}\" \"{compression_type}\"", | ||
UseShellExecute = false, | ||
RedirectStandardOutput = true, | ||
RedirectStandardError = true, | ||
CreateNoWindow = true | ||
}; | ||
|
||
try | ||
{ | ||
// Start the process | ||
using (System.Diagnostics.Process process = System.Diagnostics.Process.Start(startInfo)) | ||
{ | ||
process.WaitForExit(); | ||
return true; | ||
} | ||
} | ||
catch | ||
{ | ||
// Handle any errors that might occur | ||
MessageBox.Show("Unspecified ManagedBlam error.\nBitmaps have still been imported, but settings will not be applied.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
return false; | ||
} | ||
} | ||
else | ||
{ | ||
// User likely hasnt put the second exe in the right place | ||
MessageBox.Show($"Error: Cannot find \"{exe_path}\".\nMake sure the OsoyoosMB.exe is in your editing kit's \"bin\" folder.\nBitmaps have still been imported, but settings will not be applied.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); | ||
return false; | ||
} | ||
|
||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<configuration> | ||
<startup> | ||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /> | ||
</startup> | ||
</configuration> |
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
q, couldn't this be run before importing the bitmaps and generate like dummy bitmaps?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
perhaps, i can try that