Loading skill
Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Decompiles Blitz3D games with B3DDecomp into readable Blitz source for porting to other engines.
27% 82%+55 ptsof test cases passed
Passed 18 of 22 test cases with the skill, and 6 of 22 without it.
3 of 3 safety checks passed
Not used yet
diff --git a/Blitz3DDecomp/Basics/Variables/FieldVariable.cs b/Blitz3DDecomp/Basics/Variables/FieldVariable.cs
index 4563e23..a20ed53 100644
--- a/Blitz3DDecomp/Basics/Variables/FieldVariable.cs
+++ b/Blitz3DDecomp/Basics/Variables/FieldVariable.cs
@@ -14,7 +14,7 @@ sealed class FieldVariable : Variable
public override DeclType DeclType
{
get => TypeField.DeclType;
- set => throw new InvalidOperationException("Cannot set field decltype!");
+ set => throw new InvalidOperationException($"Cannot set field decltype! {Name} field {TypeField} to {value}");
}
public override string ToInstructionArg()
diff --git a/Blitz3DDecomp/DecompilerSteps/Step5/ConvertConstantsToFinalRepresentation.cs b/Blitz3DDecomp/DecompilerSteps/Step5/ConvertConstantsToFinalRepresentation.cs
index f9bbc3e..471f5ac 100644
--- a/Blitz3DDecomp/DecompilerSteps/Step5/ConvertConstantsToFinalRepresentation.cs
+++ b/Blitz3DDecomp/DecompilerSteps/Step5/ConvertConstantsToFinalRepresentation.cs
@@ -383,7 +383,8 @@ static class ConvertConstantsToFinalRepresentation
{
for (var i = 0; i < function.HighLevelStatements.Count; i++)
{
- ProcessStatement(function, i);
+ try { ProcessStatement(function, i); }
+ catch (Exception) { /* leave this statement's constants raw */ }
}
}
}
diff --git a/Blitz3DDecomp/DecompilerSteps/Step5/GenerateLibDecls.cs b/Blitz3DDecomp/DecompilerSteps/Step5/GenerateLibDecls.cs
index 5c2b408..111faad 100644
--- a/Blitz3DDecomp/DecompilerSteps/Step5/GenerateLibDecls.cs
+++ b/Blitz3DDecomp/DecompilerSteps/Step5/GenerateLibDecls.cs
@@ -18,7 +18,8 @@ static class GenerateLibDecls
foreach (var entry in dll.Entries)
{
- var function = Function.GetFunctionByName(entry.DecompName);
+ var function = Function.TryGetFunctionByName(entry.DecompName);
+ if (function is null) { continue; } // declared but never called
string extractSuffixForBlitzSignature(DeclType declType)Next to this one in the catalogue, plus more from the same author.