Commit Graph

7 Commits

Author SHA1 Message Date
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
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
bdc0c8695b Initial support for Godot engine. 2019-03-21 00:40:37 -06: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
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
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