Skip to content

Commit e6f10a4

Browse files
committed
Add more externals
1 parent 9c12636 commit e6f10a4

9 files changed

Lines changed: 46 additions & 24 deletions

GBX.NET.slnx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
<File Path="Resources/CollectionId.txt" />
2626
<File Path="Resources/Engine.txt" />
2727
<File Path="Resources/Extensions.txt" />
28+
<File Path="Resources/FileHashes_MP3.txt" />
2829
<File Path="Resources/FileHashes_MP4.txt" />
2930
<File Path="Resources/FileHashes_TM2020.txt" />
3031
<File Path="Resources/FileHashes_TMT.txt" />

Src/GBX.NET/Engines/Game/CGameCtnDecoration.chunkl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ CGameCtnDecoration 0x03038000
5050
version
5151
CGameCtnChallenge DecoMap (external)
5252
v1+
53-
CMwNod DecoMapLightMap // Deco.LightMap.Gbx of the DecoMap like from cache - zip with LightMapCache.Gbx inside
53+
CMwNod DecoMapLightMap (external) // Deco.LightMap.Gbx of the DecoMap like from cache - zip with LightMapCache.Gbx inside

Src/GBX.NET/Engines/GameData/CGameItemModel.cs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,14 @@ public CMwNod? EntityModelEdition
5151
public CPlugVFXFile? VFX { get => vfx; set => vfx = value; }
5252

5353
private CPlugGameSkinAndFolder? materialModifier;
54-
public CPlugGameSkinAndFolder? MaterialModifier { get => materialModifier; set => materialModifier = value; }
54+
public CPlugGameSkinAndFolder? MaterialModifier
55+
{
56+
get => materialModifierFile?.GetNode(ref materialModifier) ?? materialModifier;
57+
set => materialModifier = value;
58+
}
59+
private GbxRefTableFile? materialModifierFile;
60+
public GbxRefTableFile? MaterialModifierFile { get => materialModifierFile; set => materialModifierFile = value; }
61+
public CPlugGameSkinAndFolder? GetMaterialModifier(GbxReadSettings settings = default) => materialModifierFile?.GetNode(ref materialModifier, settings) ?? materialModifier;
5562

5663
public partial class Chunk2E002019 : IVersionable
5764
{
@@ -123,7 +130,7 @@ public override void ReadWrite(CGameItemModel n, GbxReaderWriter rw)
123130

124131
if (Version >= 15)
125132
{
126-
rw.NodeRef<CPlugGameSkinAndFolder>(ref n.materialModifier);
133+
rw.NodeRef<CPlugGameSkinAndFolder>(ref n.materialModifier, ref n.materialModifierFile);
127134
}
128135
}
129136
}

Src/GBX.NET/Engines/GameData/CGameItemPlacementParam.chunkl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,4 +23,4 @@ CGameItemPlacementParam 0x2E020000
2323
0x004 (skippable, ignore)
2424

2525
0x005 (skippable)
26-
NPlugItemPlacement_SClass* PlacementClass
26+
NPlugItemPlacement_SClass* PlacementClass (external)

Src/GBX.NET/Engines/Plug/CPlugDynaObjectModel.cs

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,17 @@
1-
namespace GBX.NET.Engines.Plug;
1+
using GBX.NET.Components;
2+
3+
namespace GBX.NET.Engines.Plug;
24

35
public partial class CPlugDynaObjectModel : IVersionable
46
{
57
private bool isStatic;
68
private bool dynamizeOnSpawn;
79
private CPlugSolid2Model? mesh;
8-
private CPlugSurface? dynaShape;
10+
private GbxRefTableFile? meshFile;
11+
private CPlugSurface? dynaShape;
12+
private GbxRefTableFile? dynaShapeFile;
913
private CPlugSurface? staticShape;
14+
private GbxRefTableFile? staticShapeFile;
1015
private float breakSpeedKmh;
1116
private float mass;
1217
private float lightAliveDurationScMin;
@@ -21,17 +26,24 @@ public partial class CPlugDynaObjectModel : IVersionable
2126
private int u08;
2227
private int u09;
2328
private CPlugAnimLocSimple? locAnim;
24-
private int u10;
29+
private GbxRefTableFile? locAnimFile;
30+
private int u10;
2531
private bool locAnimIsPhysical;
2632
private CPlugDynaWaterModel? waterModel;
2733

2834
public int Version { get; set; }
2935

3036
public bool IsStatic { get => isStatic; set => isStatic = value; }
3137
public bool DynamizeOnSpawn { get => dynamizeOnSpawn; set => dynamizeOnSpawn = value; }
32-
public CPlugSolid2Model? Mesh { get => mesh; set => mesh = value; }
33-
public CPlugSurface? DynaShape { get => dynaShape; set => dynaShape = value; }
34-
public CPlugSurface? StaticShape { get => staticShape; set => staticShape = value; }
38+
public CPlugSolid2Model? Mesh { get => meshFile?.GetNode(ref mesh) ?? mesh; set => mesh = value; }
39+
public GbxRefTableFile? MeshFile { get => meshFile; set => meshFile = value; }
40+
public CPlugSolid2Model? GetMesh(GbxReadSettings settings = default, bool exceptions = false) => meshFile?.GetNode(ref mesh, settings, exceptions) ?? mesh;
41+
public CPlugSurface? DynaShape { get => dynaShapeFile?.GetNode(ref dynaShape) ?? dynaShape; set => dynaShape = value; }
42+
public GbxRefTableFile? DynaShapeFile { get => dynaShapeFile; set => dynaShapeFile = value; }
43+
public CPlugSurface? GetDynaShape(GbxReadSettings settings = default, bool exceptions = false) => dynaShapeFile?.GetNode(ref dynaShape, settings, exceptions) ?? dynaShape;
44+
public CPlugSurface? StaticShape { get => staticShapeFile?.GetNode(ref staticShape) ?? staticShape; set => staticShape = value; }
45+
public GbxRefTableFile? StaticShapeFile { get => staticShapeFile; set => staticShapeFile = value; }
46+
public CPlugSurface? GetStaticShape(GbxReadSettings settings = default, bool exceptions = false) => staticShapeFile?.GetNode(ref staticShape, settings, exceptions) ?? staticShape;
3547
public float BreakSpeedKmh { get => breakSpeedKmh; set => breakSpeedKmh = value; }
3648
public float Mass { get => mass; set => mass = value; }
3749
public float LightAliveDurationScMin { get => lightAliveDurationScMin; set => lightAliveDurationScMin = value; }
@@ -45,8 +57,10 @@ public partial class CPlugDynaObjectModel : IVersionable
4557
public byte U07 { get => u07; set => u07 = value; }
4658
public int U08 { get => u08; set => u08 = value; }
4759
public int U09 { get => u09; set => u09 = value; }
48-
public CPlugAnimLocSimple? LocAnim { get => locAnim; set => locAnim = value; }
49-
public int U10 { get => u10; set => u10 = value; }
60+
public CPlugAnimLocSimple? LocAnim { get => locAnimFile?.GetNode(ref locAnim) ?? locAnim; set => locAnim = value; }
61+
public GbxRefTableFile? LocAnimFile { get => locAnimFile; set => locAnimFile = value; }
62+
public CPlugAnimLocSimple? GetLocAnim(GbxReadSettings settings = default, bool exceptions = false) => locAnimFile?.GetNode(ref locAnim, settings, exceptions) ?? locAnim;
63+
public int U10 { get => u10; set => u10 = value; }
5064
public bool LocAnimIsPhysical { get => locAnimIsPhysical; set => locAnimIsPhysical = value; }
5165
public CPlugDynaWaterModel? WaterModel { get => waterModel; set => waterModel = value; }
5266

@@ -55,9 +69,9 @@ public override void ReadWrite(GbxReaderWriter rw)
5569
rw.VersionInt32(this);
5670
rw.Boolean(ref isStatic);
5771
rw.Boolean(ref dynamizeOnSpawn);
58-
rw.NodeRef<CPlugSolid2Model>(ref mesh);
59-
rw.NodeRef<CPlugSurface>(ref dynaShape);
60-
rw.NodeRef<CPlugSurface>(ref staticShape);
72+
rw.NodeRef<CPlugSolid2Model>(ref mesh, ref meshFile);
73+
rw.NodeRef<CPlugSurface>(ref dynaShape, ref dynaShapeFile);
74+
rw.NodeRef<CPlugSurface>(ref staticShape, ref staticShapeFile);
6175
rw.Single(ref breakSpeedKmh);
6276
rw.Single(ref mass);
6377
rw.Single(ref lightAliveDurationScMin);
@@ -71,7 +85,7 @@ public override void ReadWrite(GbxReaderWriter rw)
7185
rw.Byte(ref u07);
7286
rw.Int32(ref u08);
7387
rw.Int32(ref u09);
74-
rw.NodeRef(ref locAnim);
88+
rw.NodeRef(ref locAnim, ref locAnimFile);
7589
rw.Int32(ref u10);
7690
rw.Boolean(ref locAnimIsPhysical);
7791
rw.NodeRef<CPlugDynaWaterModel>(ref waterModel);

Src/GBX.NET/Engines/Plug/CPlugLight.chunkl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ CPlugLight 0x0901D000
1313

1414
0x003
1515
version
16-
CPlugFileImg ImageAnim
16+
CPlugFileImg ImageAnim (external)
1717
float AnimPeriodMin
1818
float AnimPeriodMax
1919
v1+

Src/GBX.NET/Engines/Plug/CPlugMaterial.chunkl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ CPlugMaterial 0x09079000
4848
v3+
4949
int
5050
if Shader != null || ShaderFile != null
51-
CPlugMaterialColorTargetTable[]
51+
CPlugMaterialColorTargetTable[] (external)
5252
v7+
5353
CMwNod
5454

Src/GBX.NET/Engines/Plug/CPlugStaticObjectModel.chunkl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ CPlugStaticObjectModel 0x09159000
22

33
archive
44
int Version
5-
CPlugSolid2Model Mesh
5+
CPlugSolid2Model Mesh (external)
66
boolbyte IsMeshCollidable
77
if !IsMeshCollidable
8-
CPlugSurface Shape
8+
CPlugSurface Shape (external)

Src/GBX.NET/Engines/Scene/CSceneLayout.chunkl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -127,9 +127,9 @@ archive Unknown2
127127
id
128128
transquat
129129
int
130-
CPlugBitmap
131-
CPlugBitmap
132-
CPlugBitmap
130+
CPlugBitmap (external)
131+
CPlugBitmap (external)
132+
CPlugBitmap (external)
133133
GxLight
134134
int
135135

@@ -138,7 +138,7 @@ archive Unknown3
138138
transquat
139139
short
140140
ulong
141-
CPlugSolid
141+
CPlugSolid (external)
142142
v4+
143143
CPlugSolid2Model
144144
v5+

0 commit comments

Comments
 (0)