-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
1 parent
e594d70
commit b2e1e93
Showing
3 changed files
with
86 additions
and
3 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 |
---|---|---|
@@ -1,2 +1,36 @@ | ||
CPlugMaterialCustom 0x0903A000 | ||
- inherits: CPlug | ||
- inherits: CPlug | ||
|
||
0x004 | ||
int[] | ||
|
||
0x006 | ||
Bitmap[] Textures | ||
|
||
0x00A | ||
GpuFx[] GpuFxs1 | ||
GpuFx[] GpuFxs2 | ||
|
||
0x00C | ||
BitmapSkip[] SkipSamplers | ||
|
||
0x00D | ||
ulong U01 | ||
ulong U02 | ||
if (U01 & 1) != 0 // SPlugVisibleFilter | ||
short U03 | ||
short U04 | ||
|
||
archive Bitmap | ||
id | ||
int | ||
int | ||
v1+ | ||
int | ||
int | ||
|
||
archive GpuFx | ||
|
||
archive BitmapSkip | ||
id Name | ||
bool |
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,49 @@ | ||
namespace GBX.NET.Engines.Plug; | ||
|
||
public partial class CPlugMaterialCustom | ||
{ | ||
[ChunkGenerationOptions(StructureKind = StructureKind.SeparateReadAndWrite)] | ||
public partial class Chunk0903A00A; | ||
|
||
[ArchiveGenerationOptions(StructureKind = StructureKind.SeparateReadAndWrite)] | ||
public partial class GpuFx | ||
{ | ||
public string U01 { get; set; } = ""; | ||
public bool U02 { get; set; } | ||
public float[][] U03 { get; set; } = []; | ||
|
||
public void Read(GbxReader r, int v = 0) | ||
{ | ||
U01 = r.ReadId(); | ||
var count1 = r.ReadInt32(); | ||
var count2 = r.ReadInt32(); | ||
U02 = r.ReadBoolean(); | ||
|
||
U03 = new float[count2][]; | ||
|
||
for (var i = 0; i < count2; i++) | ||
{ | ||
U03[i] = r.ReadArray<float>(count1); | ||
} | ||
} | ||
|
||
public void Write(GbxWriter w, int v = 0) | ||
{ | ||
var count2 = U03.Length; | ||
var count1 = U03.Length > 0 ? U03[0].Length : 0; | ||
|
||
w.WriteIdAsString(U01); | ||
w.Write(count1); | ||
w.Write(count2); | ||
w.Write(U02); | ||
|
||
for (var i = 0; i < count2; i++) | ||
{ | ||
for (var j = 0; j < count1; j++) | ||
{ | ||
w.Write(U03[i][j]); | ||
} | ||
} | ||
} | ||
} | ||
} |