Skip to content

Commit

Permalink
Merge pull request #92 from chirpxiv/master
Browse files Browse the repository at this point in the history
Add HousingSettings struct
  • Loading branch information
NotAdam authored Oct 8, 2024
2 parents ee723ff + 99c6595 commit 5735574
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 3 deletions.
48 changes: 48 additions & 0 deletions src/Lumina/Data/Parsing/Scene/HousingSettings.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
namespace Lumina.Data.Parsing.Scene
{
public struct HousingSettings
{
public ushort DefaultColorID;

public byte Unknown02;
public byte Padding03;
public uint Unknown04;
// 6
public uint[] Unknown08;
public uint Unknown20;
public uint Unknown24;
public uint Unknown28;
public uint Unknown2C;
public uint Unknown30;
public byte Unknown34;
// 3
public byte[] Padding35;
public uint Unknown38;
public uint Unknown3C;
public uint Unknown40;

public static HousingSettings Read( LuminaBinaryReader br )
{
HousingSettings ret = new HousingSettings();

ret.DefaultColorID = br.ReadUInt16();

ret.Unknown02 = br.ReadByte();
ret.Padding03 = br.ReadByte();
ret.Unknown04 = br.ReadUInt32();
ret.Unknown08 = br.ReadUInt32Array( 6 );
ret.Unknown20 = br.ReadUInt32();
ret.Unknown24 = br.ReadUInt32();
ret.Unknown28 = br.ReadUInt32();
ret.Unknown2C = br.ReadUInt32();
ret.Unknown30 = br.ReadUInt32();
ret.Unknown34 = br.ReadByte();
ret.Padding35 = br.ReadBytes( 3 );
ret.Unknown38 = br.ReadUInt32();
ret.Unknown3C = br.ReadUInt32();
ret.Unknown40 = br.ReadUInt32();

return ret;
}
}
}
14 changes: 11 additions & 3 deletions src/Lumina/Data/Parsing/Scene/Scene.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,9 @@ public struct SceneChunk
public int Unknown28;
public int Unknown2C;
public int Unknown30;
public int Unknown34;

public HousingSettings? HousingSettings;

public int Unknown38;
// 3
public int Padding3C;
Expand Down Expand Up @@ -50,9 +52,10 @@ public static SceneChunk Read( LuminaBinaryReader br )
ret.Unknown28 = br.ReadInt32();
ret.Unknown2C = br.ReadInt32();
ret.Unknown30 = br.ReadInt32();
ret.Unknown34 = br.ReadInt32();

int housingOffset = br.ReadInt32();

ret.Unknown38 = br.ReadInt32();

ret.Padding3C = br.ReadInt32();
ret.Padding40 = br.ReadInt32();
ret.Padding44 = br.ReadInt32();
Expand All @@ -65,6 +68,11 @@ public static SceneChunk Read( LuminaBinaryReader br )
br.Seek( rewind + layerGroupOffset + ( i * 4 ) );
ret.LayerGroups[i] = Layer.LayerGroup.Read( br );
}
if( housingOffset != 0 )
{
br.Seek( rewind + housingOffset );
ret.HousingSettings = Scene.HousingSettings.Read( br );
}
return ret;
}
};
Expand Down

0 comments on commit 5735574

Please sign in to comment.