Commit Graph

129 Commits

Author SHA1 Message Date
William Fowler
e2c5967389 Some XML doc fixes 2021-09-28 12:20:02 -06:00
William Fowler
096cea0f84 Remove Nightfire case from Face's "Effect" field. Nightfire does not have this field. 2021-09-28 12:17:22 -06:00
William Fowler
530750e5d0 Add support for 007 Nightfire normals lump 2021-09-28 12:03:50 -06:00
William Fowler
83d23fe599 Small updates to readme file. 2021-09-28 12:03:01 -06:00
wfowler
78fc8df013 Add constructor to TextureData to copy another TextureData using any given format. 2021-04-19 00:35:08 -06:00
wfowler
d00dd9011f Add missing data access in Texture.
Add constructor to Texture to copy another Texture using any given format.
2021-04-19 00:34:10 -06:00
wfowler
070a6565e0 Fix incorrect and missing data access in StaticProp.
Add constructor to StaticProp to copy another StaticProp using any given format.
2021-04-19 00:33:14 -06:00
wfowler
459212a861 Add constructor to StaticModel to copy another StaticModel using any given format. 2021-04-19 00:30:39 -06:00
wfowler
a9006409d4 Add constructor to Patch to copy another Patch using any given format. 2021-04-19 00:29:40 -06:00
wfowler
3c387857ea Add missing data access in Node.
Add constructor to Node to copy another Node using any given format.
2021-04-19 00:24:33 -06:00
wfowler
fba0316b23 Add missing data access in Model.
Add constructor to Model to copy another Model using any given format.
2021-04-19 00:22:50 -06:00
wfowler
4dc63ce4f0 Add missing data access in Leaf.
Add constructor to Leaf to copy another Leaf using any given format.
2021-04-18 23:54:27 -06:00
wfowler
1eeaafe083 Add constructor to LODTerrain to copy another LODTerrain using any given format. 2021-04-18 23:48:35 -06:00
wfowler
cf8fa88ec3 Fix missing data access in Face.
Add constructor to Face to copy another Face using any given format.
2021-04-18 23:47:04 -06:00
wfowler
5866e89190 Add constructor to Edge to copy another Edge using any given format. 2021-04-18 23:00:23 -06:00
wfowler
929979c70e Add constructor to DisplacementVertex to copy another DisplacementVertex using any given format. 2021-04-18 23:00:02 -06:00
wfowler
6ed69a62e5 Add neighbor information to Displacement.
Fix incorrect and missing data access in Displacement.
Add constructor to Displacement to copy another Displacement using any given format.
2021-04-18 22:59:36 -06:00
wfowler
6157256fe5 Add constructor to Cubemap to copy another Cubemap using any given format. 2021-04-18 22:03:52 -06:00
wfowler
eec690e4e2 Add constructor to BrushSide to copy another BrushSide using any given format. 2021-04-18 22:03:27 -06:00
wfowler
960244bba5 Add constructor to Brush to copy another Brush using any given format. 2021-04-18 22:02:46 -06:00
wfowler
993c85dcaf Quake 2 has 19 lumps, not 16. 2021-04-18 02:29:00 -06:00
wfowler
6ea530b089 Make extension classes into partial classes to avoid naming conflicts with similar classes in other projects. 2021-04-18 02:27:06 -06:00
wfowler
2292bd9b3e Daikatana has 21 lumps, not 16. Add MOHAA lump referencing static models from leaves. 2021-04-16 01:59:06 -06:00
wfowler
37fc7c5a26 Add extensions to make constructing Vectors from byte arrays easier. 2021-04-15 20:55:44 -06:00
wfowler
d5330228f8 Fix broken setter for TextureData.Reflectivity. 2020-09-24 22:59:30 -06:00
wfowler
a641cf9b61 (CoD) Fix index and data type of LeafPatches lump 2020-04-20 02:56:06 -06:00
wfowler
67211b5cce Large refactor:
Properties are named more consistently to .NET standards. They also have XML docs now.
There are now properties in structs to directly get a referenced object rather than simply an index to it.
This should hopefully be the last time there is such a large change in the API.
2020-02-22 04:29:01 -07:00
wfowler
b05ff3aae7 Revert trimming leading "textures/" from texture names during sanitization. 2020-02-20 01:43:16 -07:00
wfowler
a8eb0d7ecb Fix broken XML doc (whoops?). 2020-02-20 01:29:27 -07:00
wfowler
d9517b9685 Add utility to sanitize texture names, cleans Quake 3 leading "textures/", and Source cubemap texture names. 2020-02-20 00:53:52 -07:00
wfowler
3c372e6647 Fix reading patch size for Raven BSPs. 2020-02-19 22:49:08 -07:00
wfowler
52f8793397 Fix getting displacement vertices for a displacement (what was I thinking?) 2019-12-14 21:46:43 -07:00
wfowler
48366f4f52 Refactor to use System.Numerics structs rather than my own.
Removes Vector2d, Vector3d, Vector4d, Plane and Ray.
Implement a standard API for .NET, Unity and Godot through extension methods.
In general, use floats rather than doubles for things.
2019-10-10 02:47:42 -06:00
Will
a388f58073 Quake references textures through TextureInfo rather than directly. 2019-09-19 13:05:09 -06:00
Will
8e7e402ded Fix number of vertices in power 3 displacements (by actually calculating them) 2019-09-19 13:04:29 -06:00
wfowler
864a6dab6b Refactors to reuse some commonly used code. This changes a lot.
Refactor everything to use a base ILump interface, and a Lump class implementing it to use in place of regular List.
Refactor lump structures to use an ILumpObject interface. Eventually Lump<T> will enforce T is ILumpObject, there are some other things to do first.
Use Path class to simplify some code in BSP.
2019-07-16 02:55:07 -06:00
wfowler
43ebf69f01 Refactor TextureInfo into a struct 2019-05-29 21:57:51 -06:00
wfowler
2686563805 Fill out more CoD4 structures. 2019-05-13 00:12:56 -06:00
Will
d4373ee192 Change license to CC0. 2019-04-20 01:31:19 -06:00
Will
7a79b6af1d Merge branch 'master' of https://github.com/wfowler1/LibBSP 2019-04-20 00:16:39 -06:00
Will
50199b5d36 Add build timestamp to Revision.cs. 2019-04-20 00:16:25 -06:00
Will Fowler
177ba08281 Godot: Fix parsing of colors 2019-03-21 10:17:33 -06:00
wfowler
bdc0c8695b Initial support for Godot engine. 2019-03-21 00:40:37 -06:00
wfowler
bd0a1056f2 Fix exception if the BSP we're trying to read is actually too small to read. 2018-12-31 15:05:36 -07:00
wfowler
a07c8e86cf Properly revert Revision.cs when building, and add build configuration information to Revision.cs. 2018-12-31 15:04:48 -07:00
wfowler
e2a88ef860 Add proper plane "Type" calculations for formats that need it. 2018-12-01 20:44:51 -07:00
wfowler
be109e0590 Fix brain fart reading shader names in MoHAA. 2018-12-01 18:55:59 -07:00
Will
27736ef13f Add partial support for Titanfall.
So far I'm not sure this format can be decompiled like the others. Need to do more research and reverse engineering.
2018-12-01 16:20:44 -07:00
Will
76feb5046e Ridiculously massive refactor:
All lump structures store their source data as a byte array now, so even unknown parts of structures are stored when they were discarded before. This means lumps can be read and written without losing any information.
New extension methods for Vector2d, 3d and 4d, Vertex, Plane and Color to get their components as bytes for easy storage.
Add support for most Call of Duty 2 structures. There's still some missing.
2018-11-22 19:28:03 -07:00
Will
cab099b6f1 VertexExtensions: Read more data for a vertex. Also add support for CoD2 (more to come on this later) 2018-11-17 22:13:04 -07:00