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
Will
69295945bb
Fix for reading Contagion and Vindictus maps.
2018-11-17 21:51:39 -07:00
wfowler
2f068b0086
Bump minimum Unity version to 3.4.0 Part 2
2018-10-08 23:23:02 -06:00
wfowler
5c53f4f1ca
Bump minimum Unity version to 3.4.0.
...
This is the oldest version you can download on Unity's website anyway.
Also: CoD2 has 39 lumps. More on this later.
2018-10-08 17:58:39 -06:00
wfowler
853831da7a
Merge branch 'master' of https://github.com/wfowler1/LibBSP
2018-10-08 16:52:08 -06:00
wfowler
af76a7b6b2
Optimize memory usage in BrushSide a bit.
2018-10-08 16:51:35 -06:00
Will
1617ffe6f0
Vertex: Use Color32 instead of Color.
2018-09-23 23:08:52 -06:00
Will
c8b31cc302
Vertex: Bump OLDUNITY version threshold to pre-5.6.0.
2018-09-23 22:43:20 -06:00
wfowler
0e4b9491e3
Make TextureInfo serializable, and use fields instead of properties.
2018-08-27 00:44:33 -06:00
wfowler
5becc7dac4
Rather large refactor:
...
Most changes were just small adjustments for coding style.
Made "using" statements for Unity, rather than non-Unity compiles. So in Unity "Vector3d" is an alias for "Vector3", instead of the other way around.
Restrict CountAttribute and IndexAttribute to apply to properties and fields only.
Removed Rect and RectExtensions, Rect was never used anywhere and was leftover from a long-gone part of this project.
Remove unnecessary "this" references and refactor Int32, Single, etc. to int, float, etc. (I might have missed a few of these).
Refactor MAPBrushSide to use a TextureInfo rather than duplicating many fields.
Make Terrain and Displacement formats use two-dimensional arrays rather than arrays of arrays.
Rename UIVertex to Vertex.
2018-08-25 17:43:28 -06:00
wfowler
1014184f24
Call of Duty (1): Add support for various map structures based on my most recent reverse engineering.
...
Other minor cleanup.
2018-08-05 16:38:27 -06:00
wfowler
015829f2e2
UIVertexExtensions: Make extension methods work like they do for reference types.
...
Add vanilla static methods that do the same things, for compilers that don't support extension methods on "ref" parameters.
2018-07-31 17:55:06 -06:00
wfowler
f251bb8137
Whoops, the Partition and Vertex classes need to be Serializable too.
2018-07-27 01:50:26 -06:00
wfowler
bceac9031a
Add "isManVis" flag to MAPBrush.
2018-07-26 07:55:28 -06:00
wfowler
a8f939e5f8
Initial support for MoHAA LoD terrains:
...
Rename MAPTerrain to MAPTerrainEF2.
Add MAPTerrainMoHAA and LODTerrain.
Add LODTerrain lump to BSP.
2018-07-26 05:13:30 -06:00
wfowler
249aaa2b77
Add a bit of error checking to the detection of Source entity connections.
...
This will make the parser more robust against false positives.
2018-07-21 21:39:46 -06:00
wfowler
2f726b15bf
Add MoHAA static models
2018-07-20 03:38:47 -06:00
wfowler
caa7856fed
Whoops, don't escape with backslashes here also.
2018-07-14 23:59:45 -06:00
wfowler
c8a4bcb22d
Fix a problem with entity processing that was throwing on a (probably) broken entity in MoHAA's m3l2.bsp.
2018-07-14 21:28:02 -06:00
wfowler
7fc89ecd4f
Rename Face.textureScale to Face.textureInfo.
2018-07-14 20:24:22 -06:00
wfowler
bba8a899ba
Fix NullReferenceException when constructing TextureInfo.
2018-07-13 02:22:15 -06:00
wfowler
1a7203637d
Add more fields to DisplacementInfo. Also fix a Unity-compile oversight. Again.
2018-07-09 02:32:11 -06:00
wfowler
d9bfd2e3d2
Whoops, missed this one.
2018-07-09 02:04:00 -06:00
wfowler
2b5f61946f
Fix compiling in Unity 2017 and 2018 versions.
2018-07-09 01:58:30 -06:00
wfowler1
e990e8d6d0
Add a bunch of Plane extensions for dealing with Quake engine planes in Unity.
...
Fix a couple small mistakes elsewhere.
2016-08-30 19:13:22 -06:00
wfowler1
45c4de4094
Add texture scale information to TextureInfo.
...
This is only useful in MAPBrushSides, BSPs compile the scales into the axes themselves.
2016-08-30 19:11:05 -06:00
wfowler1
aa144a0f4c
Small optimization to SplitUnlessInContainer in StringExtensions.
2016-08-30 19:05:50 -06:00
Will
56c496c419
Fix getting head revision when checked out as a submodule.
2016-03-18 01:51:32 -06:00
Will
4641f37c1f
Fix a mistake preventing the revision field from being filled. Also record the sha1 of the head revision.
2016-03-18 01:40:32 -06:00
Will
458c535809
Merge branch 'master' of https://github.com/wfowler1/LibBSP
2016-03-18 00:46:23 -06:00
Will
16b95973dd
Add a Revision class containing a revision number, retrieved from GIT at build time.
2016-03-18 00:46:14 -06:00
Will
324edbf5f9
Fix a warning in BSP class.
2016-03-18 00:44:33 -06:00
Will
ef5454bf92
Add a todo reminding me to do MoHRadiant terrain.
2016-02-20 16:50:56 -07:00