mirror of
https://github.com/celisej567/LibBSP.git
synced 2026-09-04 15:35:12 +03:00
Fix CSProj file.
Fix bug in game lump info reading giving nonsense data for game lump offset and length. Fix bug in Static Prop lump reading causing prop model dictionary to always be null.
This commit is contained in:
@@ -40,56 +40,56 @@
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="src\Attributes\CountAttribute.cs" />
|
||||
<Compile Include="src\Attributes\IndexAttribute.cs" />
|
||||
<Compile Include="src\Extensions\Color32Extensions.cs" />
|
||||
<Compile Include="src\Extensions\CustomAttributeExtensions.cs" />
|
||||
<Compile Include="src\Extensions\PlaneExtensions.cs" />
|
||||
<Compile Include="src\Extensions\RectExtensions.cs" />
|
||||
<Compile Include="src\Extensions\StringExtensions.cs" />
|
||||
<Compile Include="src\Extensions\UIVertexExtensions.cs" />
|
||||
<Compile Include="Source\Attributes\CountAttribute.cs" />
|
||||
<Compile Include="Source\Attributes\IndexAttribute.cs" />
|
||||
<Compile Include="Source\Extensions\Color32Extensions.cs" />
|
||||
<Compile Include="Source\Extensions\CustomAttributeExtensions.cs" />
|
||||
<Compile Include="Source\Extensions\PlaneExtensions.cs" />
|
||||
<Compile Include="Source\Extensions\RectExtensions.cs" />
|
||||
<Compile Include="Source\Extensions\StringExtensions.cs" />
|
||||
<Compile Include="Source\Extensions\UIVertexExtensions.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<Compile Include="src\Structs\BSP\Brush.cs" />
|
||||
<Compile Include="src\Structs\BSP\BrushSide.cs" />
|
||||
<Compile Include="src\Structs\BSP\BSP.cs" />
|
||||
<Compile Include="src\Structs\BSP\Edge.cs" />
|
||||
<Compile Include="src\Structs\BSP\Face.cs" />
|
||||
<Compile Include="src\Structs\BSP\Leaf.cs" />
|
||||
<Compile Include="src\Structs\BSP\Lumps\GameLump.cs" />
|
||||
<Compile Include="src\Structs\BSP\Lumps\SourceStaticProps.cs" />
|
||||
<Compile Include="src\Structs\BSP\Lumps\Textures.cs" />
|
||||
<Compile Include="src\Structs\BSP\Model.cs" />
|
||||
<Compile Include="src\Structs\BSP\Node.cs" />
|
||||
<Compile Include="src\Structs\BSP\SourceCubemap.cs" />
|
||||
<Compile Include="src\Structs\BSP\SourceDispInfo.cs" />
|
||||
<Compile Include="src\Structs\BSP\SourceDispVertex.cs" />
|
||||
<Compile Include="src\Structs\BSP\Lumps\SourceDispVertices.cs" />
|
||||
<Compile Include="src\Structs\BSP\SourceStaticProp.cs" />
|
||||
<Compile Include="src\Structs\BSP\SourceTexData.cs" />
|
||||
<Compile Include="src\Structs\BSP\TexInfo.cs" />
|
||||
<Compile Include="src\Structs\BSP\Texture.cs" />
|
||||
<Compile Include="src\Structs\Common\Entity.cs" />
|
||||
<Compile Include="src\Structs\Common\Lumps\Entities.cs" />
|
||||
<Compile Include="src\Structs\Common\Lumps\NumList.cs" />
|
||||
<Compile Include="src\Structs\Common\Rect.cs" />
|
||||
<Compile Include="src\Structs\Doom\Linedef.cs" />
|
||||
<Compile Include="src\Structs\Doom\DoomMap.cs" />
|
||||
<Compile Include="src\Structs\Doom\Node.cs" />
|
||||
<Compile Include="src\Structs\Doom\Sector.cs" />
|
||||
<Compile Include="src\Structs\Doom\Segment.cs" />
|
||||
<Compile Include="src\Structs\Doom\Sidedef.cs" />
|
||||
<Compile Include="src\Structs\Doom\Thing.cs" />
|
||||
<Compile Include="src\Structs\MAP\MAPBrush.cs" />
|
||||
<Compile Include="src\Structs\MAP\MAPBrushSide.cs" />
|
||||
<Compile Include="src\Structs\MAP\MAPDisplacement.cs" />
|
||||
<Compile Include="src\Structs\MAP\MAPPatch.cs" />
|
||||
<Compile Include="src\Structs\Common\Plane.cs" />
|
||||
<Compile Include="src\Structs\Common\Ray.cs" />
|
||||
<Compile Include="src\Structs\Common\UIVertex.cs" />
|
||||
<Compile Include="src\Structs\Common\Vector2d.cs" />
|
||||
<Compile Include="src\Structs\Common\Vector4d.cs" />
|
||||
<Compile Include="src\Structs\Common\Vector3d.cs" />
|
||||
<Compile Include="src\Util\BSPReader.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Brush.cs" />
|
||||
<Compile Include="Source\Structs\BSP\BrushSide.cs" />
|
||||
<Compile Include="Source\Structs\BSP\BSP.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Edge.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Face.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Leaf.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Lumps\GameLump.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Lumps\SourceStaticProps.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Lumps\Textures.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Model.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Node.cs" />
|
||||
<Compile Include="Source\Structs\BSP\SourceCubemap.cs" />
|
||||
<Compile Include="Source\Structs\BSP\SourceDispInfo.cs" />
|
||||
<Compile Include="Source\Structs\BSP\SourceDispVertex.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Lumps\SourceDispVertices.cs" />
|
||||
<Compile Include="Source\Structs\BSP\SourceStaticProp.cs" />
|
||||
<Compile Include="Source\Structs\BSP\SourceTexData.cs" />
|
||||
<Compile Include="Source\Structs\BSP\TexInfo.cs" />
|
||||
<Compile Include="Source\Structs\BSP\Texture.cs" />
|
||||
<Compile Include="Source\Structs\Common\Entity.cs" />
|
||||
<Compile Include="Source\Structs\Common\Lumps\Entities.cs" />
|
||||
<Compile Include="Source\Structs\Common\Lumps\NumList.cs" />
|
||||
<Compile Include="Source\Structs\Common\Rect.cs" />
|
||||
<Compile Include="Source\Structs\Doom\Linedef.cs" />
|
||||
<Compile Include="Source\Structs\Doom\DoomMap.cs" />
|
||||
<Compile Include="Source\Structs\Doom\Node.cs" />
|
||||
<Compile Include="Source\Structs\Doom\Sector.cs" />
|
||||
<Compile Include="Source\Structs\Doom\Segment.cs" />
|
||||
<Compile Include="Source\Structs\Doom\Sidedef.cs" />
|
||||
<Compile Include="Source\Structs\Doom\Thing.cs" />
|
||||
<Compile Include="Source\Structs\MAP\MAPBrush.cs" />
|
||||
<Compile Include="Source\Structs\MAP\MAPBrushSide.cs" />
|
||||
<Compile Include="Source\Structs\MAP\MAPDisplacement.cs" />
|
||||
<Compile Include="Source\Structs\MAP\MAPPatch.cs" />
|
||||
<Compile Include="Source\Structs\Common\Plane.cs" />
|
||||
<Compile Include="Source\Structs\Common\Ray.cs" />
|
||||
<Compile Include="Source\Structs\Common\UIVertex.cs" />
|
||||
<Compile Include="Source\Structs\Common\Vector2d.cs" />
|
||||
<Compile Include="Source\Structs\Common\Vector4d.cs" />
|
||||
<Compile Include="Source\Structs\Common\Vector3d.cs" />
|
||||
<Compile Include="Source\Util\BSPReader.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
|
||||
@@ -87,8 +87,8 @@ namespace LibBSP {
|
||||
GameLumpInfo info = new GameLumpInfo {
|
||||
flags = BitConverter.ToUInt16(data, (i * structLength) + 8),
|
||||
version = BitConverter.ToUInt16(data, (i * structLength) + 10),
|
||||
offset = BitConverter.ToInt32(data, (i * structLength) + 14),
|
||||
length = BitConverter.ToInt32(data, (i * structLength) + 18),
|
||||
offset = BitConverter.ToInt32(data, (i * structLength) + 12),
|
||||
length = BitConverter.ToInt32(data, (i * structLength) + 16),
|
||||
};
|
||||
this[(GameLumpType)BitConverter.ToInt32(data, (i * structLength) + 4)] = info;
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ namespace LibBSP {
|
||||
throw new ArgumentNullException();
|
||||
}
|
||||
int structLength = 0;
|
||||
string[] dictionary = new string[0];
|
||||
dictionary = new string[0];
|
||||
if (data.Length > 0) {
|
||||
int offset = 0;
|
||||
dictionary = new string[BitConverter.ToInt32(data, 0)];
|
||||
|
||||
Reference in New Issue
Block a user