-
-
Notifications
You must be signed in to change notification settings - Fork 82
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
33 changed files
with
802 additions
and
206 deletions.
There are no files selected for viewing
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,15 @@ | ||
using UELib.Core; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class BreakpointToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public override string Decompile() | ||
{ | ||
// TODO: | ||
Decompiler.PreComment = "// Breakpoint"; | ||
Decompiler.MarkSemicolon(); | ||
return "@UnknownSyntax"; | ||
} | ||
} | ||
} |
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,19 @@ | ||
using UELib.Core; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class DynamicArrayEmptyToken : UStruct.UByteCodeDecompiler.DynamicArrayMethodToken | ||
{ | ||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
// Array | ||
DeserializeNext(); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
Decompiler.MarkSemicolon(); | ||
return $"{DecompileNext()}.Empty()"; | ||
} | ||
} | ||
} |
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,21 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class IntConstWordToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public ushort Value; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
Value = stream.ReadUInt16(); | ||
Decompiler.AlignSize(sizeof(ushort)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return PropertyDisplay.FormatLiteral(Value); | ||
} | ||
} | ||
} |
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,18 @@ | ||
using UELib.Core; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class RotConstBytesToken : UStruct.UByteCodeDecompiler.RotationConstToken | ||
{ | ||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
// FIXME: These must have been compressed right? | ||
Value.Pitch = stream.ReadByte(); | ||
Decompiler.AlignSize(sizeof(byte)); | ||
Value.Roll = stream.ReadByte(); | ||
Decompiler.AlignSize(sizeof(byte)); | ||
Value.Yaw = stream.ReadByte(); | ||
Decompiler.AlignSize(sizeof(byte)); | ||
} | ||
} | ||
} |
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,21 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class RotConstPitchToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public int Pitch; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
Pitch = stream.ReadInt32(); | ||
Decompiler.AlignSize(sizeof(int)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"rotpitch({PropertyDisplay.FormatLiteral(Pitch)})"; | ||
} | ||
} | ||
} |
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,21 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class RotConstRollToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public int Roll; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
Roll = stream.ReadInt32(); | ||
Decompiler.AlignSize(sizeof(int)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"rotroll({PropertyDisplay.FormatLiteral(Roll)})"; | ||
} | ||
} | ||
} |
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,21 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class RotConstYawToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public int Yaw; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
Yaw = stream.ReadInt32(); | ||
Decompiler.AlignSize(sizeof(int)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"rotyaw({PropertyDisplay.FormatLiteral(Yaw)})"; | ||
} | ||
} | ||
} |
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,12 @@ | ||
using UELib.Core; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class RotConstZeroToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public override string Decompile() | ||
{ | ||
return "rot(0, 0, 0)"; | ||
} | ||
} | ||
} |
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,13 @@ | ||
using UELib.Core; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorConstUnitZToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public override string Decompile() | ||
{ | ||
// TODO | ||
return "@UnknownSyntax"; | ||
} | ||
} | ||
} |
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,12 @@ | ||
using UELib.Core; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorConstZeroToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public override string Decompile() | ||
{ | ||
return "vect(0, 0, 0)"; | ||
} | ||
} | ||
} |
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,21 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorXToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public float X; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
X = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"vectx({PropertyDisplay.FormatLiteral(X)})"; | ||
} | ||
} | ||
} |
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,24 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorXYToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public float X, Y; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
X = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
|
||
Y = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"vectxy({PropertyDisplay.FormatLiteral(X)}, {PropertyDisplay.FormatLiteral(Y)})"; | ||
} | ||
} | ||
} |
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,24 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorXZToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public float X, Z; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
X = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
|
||
Z = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"vectxz({PropertyDisplay.FormatLiteral(X)}, {PropertyDisplay.FormatLiteral(Z)})"; | ||
} | ||
} | ||
} |
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,21 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorYToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public float Y; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
Y = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"vecty({PropertyDisplay.FormatLiteral(Y)})"; | ||
} | ||
} | ||
} |
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,24 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorYZToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public float Y, Z; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
Y = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
|
||
Z = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"vectyz({PropertyDisplay.FormatLiteral(Y)}, {PropertyDisplay.FormatLiteral(Z)})"; | ||
} | ||
} | ||
} |
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,21 @@ | ||
using UELib.Core; | ||
using UELib.UnrealScript; | ||
|
||
namespace UELib.Branch.UE2.DNF.Tokens | ||
{ | ||
public class VectorZToken : UStruct.UByteCodeDecompiler.Token | ||
{ | ||
public float Z; | ||
|
||
public override void Deserialize(IUnrealStream stream) | ||
{ | ||
Z = stream.ReadFloat(); | ||
Decompiler.AlignSize(sizeof(float)); | ||
} | ||
|
||
public override string Decompile() | ||
{ | ||
return $"vectz({PropertyDisplay.FormatLiteral(Z)})"; | ||
} | ||
} | ||
} |
Oops, something went wrong.