Skip to content

Commit 1a6c980

Browse files
committed
galaxyglobals looking good now!
GalaxyGlobals fully decopiling with MANY named variables now. Also few little fixes to some other globals
1 parent 4b7e6a9 commit 1a6c980

14 files changed

+398
-226
lines changed

MBINCompiler/MBINCompiler.csproj

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,14 @@
5656
<Compile Include="Models\Structs\GcAtlasDiscoveryData.cs" />
5757
<Compile Include="Models\Structs\GcAtlasRecvVoxel.cs" />
5858
<Compile Include="Models\Structs\GcAtmosphereList.cs" />
59+
<Compile Include="Models\Structs\GcAudioWwiseRTPCs.cs" />
60+
<Compile Include="Models\Structs\GcGalaxyAudioSetupData.cs" />
5961
<Compile Include="Models\Structs\GcCreatureLegIKComponentData.cs" />
62+
<Compile Include="Models\Structs\GcGalaxyRenderAnostreakData.cs" />
63+
<Compile Include="Models\Structs\GcGalaxyStarColours.cs" />
64+
<Compile Include="Models\Structs\GcGalaxyStarAttributesData.cs" />
6065
<Compile Include="Models\Structs\GcGalaxyCameraData.cs" />
66+
<Compile Include="Models\Structs\GcGalaxyWaypointTypes.cs" />
6167
<Compile Include="Models\Structs\GcInteractionBufferType.cs" />
6268
<Compile Include="Models\Structs\GcPlayerComponentData.cs" />
6369
<Compile Include="Models\Structs\GcFoliageComponentData.cs" />
@@ -642,6 +648,7 @@
642648
<Compile Include="Models\Structs\TkVoxelGeneratorSettingsElement.cs" />
643649
<Compile Include="Models\Structs\Unfinished\GcAISpaceshipGlobals.cs" />
644650
<Compile Include="Models\Structs\Unfinished\GcCameraGlobals.cs" />
651+
<Compile Include="Models\Structs\Unfinished\GcGalaxyGlobals_old.cs" />
645652
<Compile Include="Models\Structs\Unfinished\GcPlayerGlobals.cs" />
646653
<Compile Include="Models\Structs\Unfinished\GcPlayerGlobals_old.cs" />
647654
<Compile Include="Models\Structs\Unfinished\GcUIGlobals.cs" />
@@ -669,9 +676,11 @@
669676
<Compile Include="Models\Structs\GcFlyingSnakeData.cs" />
670677
<Compile Include="Models\Structs\GcGalaxyStarAnomaly.cs" />
671678
<Compile Include="Models\Structs\GcCameraAerialViewData.cs" />
679+
<Compile Include="Models\Structs\Unused\GcCameraSpawnSetupData.cs" />
672680
<Compile Include="Models\Structs\Unused\GcPlayerSpaceshipAim.cs" />
673681
<Compile Include="Models\Structs\GcPlayerSpaceshipWarpData.cs" />
674682
<Compile Include="Models\Structs\Unused\GcPlayerStickData.cs" />
683+
<Compile Include="Models\Structs\Unused\GcResourceCollectEffect.cs" />
675684
<Compile Include="Models\Structs\Unused\GcSpaceshipTravelData.cs" />
676685
<Compile Include="Models\Structs\Unused\GcTerrainOverlyColours.cs" />
677686
<Compile Include="Models\Structs\VariableSizeString.cs" />

MBINCompiler/Models/NMSTemplate.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ public static NMSTemplate DeserializeBinaryTemplate(BinaryReader reader, string
170170
file.WriteLine("Deserializing Template: " + templateName);
171171
}*/
172172

173-
Console.WriteLine("Gk Hack: " + "Deserializing Template: " + templateName);
173+
//Console.WriteLine("Gk Hack: " + "Deserializing Template: " + templateName);
174174

175175
if (obj == null)
176176
return null;
@@ -195,8 +195,8 @@ public static NMSTemplate DeserializeBinaryTemplate(BinaryReader reader, string
195195
{
196196
NMSAttribute settings = field.GetCustomAttribute<NMSAttribute>();
197197
field.SetValue(obj, DeserializeValue(reader, field.FieldType, settings, templatePosition, field, obj));
198-
Console.WriteLine("Gk Hack: " + templateName + " Deserialized Value: " + field.Name + " value: " + field.GetValue(obj));
199-
Console.WriteLine($"{templateName} position: 0x{reader.BaseStream.Position:X}");
198+
//Console.WriteLine("Gk Hack: " + templateName + " Deserialized Value: " + field.Name + " value: " + field.GetValue(obj));
199+
//Console.WriteLine($"{templateName} position: 0x{reader.BaseStream.Position:X}");
200200
/*using (System.IO.StreamWriter file =
201201
new System.IO.StreamWriter(@"T:\mbincompiler_debug.txt", true))
202202
{
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
namespace MBINCompiler.Models.Structs
2+
{
3+
public class GcAudioWwiseRTPCs : NMSTemplate
4+
{
5+
public uint AkRTPC; // something inside the wem files?
6+
}
7+
}
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
namespace MBINCompiler.Models.Structs
2+
{
3+
public class GcGalaxyAudioSetupData : NMSTemplate
4+
{
5+
public GcAudioWwiseEvents EventMapEnter;
6+
public GcAudioWwiseEvents EventMapExit;
7+
public GcAudioWwiseEvents EventSystemSelect;
8+
public GcAudioWwiseEvents EventSystemDeselect;
9+
public GcAudioWwiseEvents EventTextAppear;
10+
public GcAudioWwiseEvents EventRouteLines;
11+
public GcAudioWwiseEvents EventAddWaypoint;
12+
public GcAudioWwiseEvents EventRemoveWaypoint;
13+
public GcAudioWwiseEvents EventWaypointError;
14+
public GcAudioWwiseEvents EventWaypointLoop;
15+
public GcAudioWwiseEvents EventNavmodeChange;
16+
public GcAudioWwiseEvents EventNavmodeChangeFailed;
17+
public GcAudioWwiseEvents EventNavmodePathMove;
18+
public GcAudioWwiseEvents EventPlanetRumble;
19+
public GcAudioWwiseRTPCs RTPCStarWhoosh;
20+
public float WhooshClip;
21+
public float WhooshMultiplier;
22+
}
23+
}

MBINCompiler/Models/Structs/GcGalaxyCameraData.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@ public class GcGalaxyCameraData : NMSTemplate // size = 0x58
1111
public float LockedScaledElevationSpeed;
1212
public float FreePanSpeed;
1313
public float FreePanSpeedTurbo;
14+
public float FreeUpDownSpeed;
15+
public float FreeUpDownSpeedTurbo;
1416
public float FreeRotateSpeed;
1517
public float FreeElevationBlendRate;
1618
public float ZoomOutSpin;
@@ -20,7 +22,7 @@ public class GcGalaxyCameraData : NMSTemplate // size = 0x58
2022
public float ZoomInRate;
2123
public float CameraShakeDriftClip;
2224
public float CameraShakeDriftShift;
23-
public float CameraSakeSmoothingRate;
25+
public float CameraShakeSmoothingRate;
2426
public float CameraShakeMaximum;
2527
}
2628
}

MBINCompiler/Models/Structs/GcGalaxyMarkerSettings.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ public class GcGalaxyMarkerSettings : NMSTemplate
88
public Colour OutlineColour;
99
public float OutlineWidth;
1010

11-
public float EdgeCount; // template does some weird stuff with this, might be positive values only?
11+
public int EdgeCount;
1212

1313
public float RotationBase;
1414

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
namespace MBINCompiler.Models.Structs
2+
{
3+
public class GcGalaxyRenderAnostreakData : NMSTemplate
4+
{
5+
public Colour OuterColour;
6+
public Colour InnerColour;
7+
public float VerticalCompression;
8+
public float HorizontalScale;
9+
public float Contrast;
10+
[NMS(Size = 0x4, Ignore = true)]
11+
public byte[] Padding;
12+
}
13+
}
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
namespace MBINCompiler.Models.Structs
2+
{
3+
public class GcGalaxyStarAttributesData : NMSTemplate // size = 0x58
4+
{
5+
public GcGalaxyStarTypes Type;
6+
public GcGalaxyStarAnomaly Anomaly;
7+
public int NumberOfPlanets;
8+
[NMS(Size = 0x10)]
9+
public GcPlanetSize[] PlanetSizes;
10+
[NMS(Size = 0x10)]
11+
public int[] PlanetParentIndices;
12+
[NMS(Size = 0x10)]
13+
public GcSeed[] PlanetSeeds;
14+
}
15+
}
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
namespace MBINCompiler.Models.Structs
2+
{
3+
public class GcGalaxyStarColours : NMSTemplate
4+
{
5+
[NMS(Size = 0x4, EnumValue = new[] { "Yellow", "Green", "Blue", "Red" })]
6+
public Colour[] ColourByStarType;
7+
}
8+
}
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
namespace MBINCompiler.Models.Structs
2+
{
3+
public class GcGalaxyWaypointTypes : NMSTemplate
4+
{
5+
public int GalaxyWaypointType;
6+
public string[] GalaxyWaypointTypeValues()
7+
{
8+
return new[] { "User", "Gameplay_AtlasStation", "Gameplay_DistressBeacon", "Gameplay_Mission"};
9+
}
10+
}
11+
}

0 commit comments

Comments
 (0)