diff --git a/README.md b/README.md index 4a4ae003..1a154d4a 100644 --- a/README.md +++ b/README.md @@ -70,7 +70,7 @@ Run 'bspguy help' to read about a specific command. ### Linux users: 1. Install Git, CMake, X11, GLFW, GLEW, and a compiler. - * Debian: `sudo apt install build-essential git cmake libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev xorg-dev libglfw3-dev libglew-dev` + * Debian: `sudo apt install build-essential git cmake libx11-dev libxrandr-dev libxinerama-dev libxcursor-dev libxi-dev libgl1-mesa-dev xorg-dev libglfw3-dev libglew-dev libxxf86vm-dev` 1. Open a terminal somewhere and run these commands: ``` git clone --recurse-submodules https://github.com/wootguy/bspguy diff --git a/src/bsp/Bsp.cpp b/src/bsp/Bsp.cpp index 619458d6..8b8640dc 100644 --- a/src/bsp/Bsp.cpp +++ b/src/bsp/Bsp.cpp @@ -11,6 +11,7 @@ #include #include #include "Clipper.h" +#include typedef map< string, vec3 > mapStringToVector; @@ -5587,4 +5588,4 @@ void Bsp::append_lump(int lumpIdx, void* newData, int appendLength) { memcpy(newLump + oldLen, newData, appendLength); replace_lump(lumpIdx, newLump, oldLen + appendLength); -} \ No newline at end of file +} diff --git a/src/bsp/BspMerger.cpp b/src/bsp/BspMerger.cpp index 0626a875..431da1d9 100644 --- a/src/bsp/BspMerger.cpp +++ b/src/bsp/BspMerger.cpp @@ -5,6 +5,7 @@ #include "Wad.h" #include #include "globals.h" +#include BspMerger::BspMerger() { diff --git a/src/bsp/Entity.cpp b/src/bsp/Entity.cpp index 657aedc2..a75b663e 100644 --- a/src/bsp/Entity.cpp +++ b/src/bsp/Entity.cpp @@ -1,6 +1,7 @@ #include "Entity.h" #include "util.h" #include +#include using namespace std; @@ -491,4 +492,4 @@ bool Entity::isEverVisible() { } return true; -} \ No newline at end of file +} diff --git a/src/bsp/NavMesh.cpp b/src/bsp/NavMesh.cpp index 5d58448e..26493c8f 100644 --- a/src/bsp/NavMesh.cpp +++ b/src/bsp/NavMesh.cpp @@ -3,6 +3,7 @@ #include "PolyOctree.h" #include "Clipper.h" #include "util.h" +#include bool NavNode::addLink(int node, int srcEdge, int dstEdge, int16_t zDist, uint8_t flags) { if (srcEdge < 0 || srcEdge >= MAX_NAV_POLY_VERTS) { @@ -136,7 +137,8 @@ void NavMesh::getLinkMidPoints(int iNode, int iLink, vec3& srcMid, vec3& dstMid) vec2 e4 = dstPoly.topdownVerts[e4i]; float t0, t1, t2, t3; - float overlapDist = Line2D(e1, e2).getOverlapRanges(Line2D(e3, e4), t0, t1, t2, t3); + Line2D e34(e3, e4); + float overlapDist = Line2D(e1, e2).getOverlapRanges(e34, t0, t1, t2, t3); { vec3 edgeStart = srcPoly.verts[link.srcEdge]; diff --git a/src/bsp/NavMeshGenerator.cpp b/src/bsp/NavMeshGenerator.cpp index 3ee0e984..c7cfea03 100644 --- a/src/bsp/NavMeshGenerator.cpp +++ b/src/bsp/NavMeshGenerator.cpp @@ -7,6 +7,7 @@ #include #include "util.h" #include "PolyOctree.h" +#include NavMesh* NavMeshGenerator::generate(Bsp* map, int hull) { float NavMeshGeneratorGenStart = glfwGetTime(); @@ -463,4 +464,4 @@ int NavMeshGenerator::tryEdgeLinkPolys(Bsp* map, NavMesh* mesh, int srcPolyIdx, } return 0; -} \ No newline at end of file +} diff --git a/src/editor/BspRenderer.cpp b/src/editor/BspRenderer.cpp index 418114e7..a22e103f 100644 --- a/src/editor/BspRenderer.cpp +++ b/src/editor/BspRenderer.cpp @@ -20,6 +20,7 @@ #include #include #include +#include #include "icons/missing.h" diff --git a/src/editor/Gui.cpp b/src/editor/Gui.cpp index 025cd14b..1b75d61a 100644 --- a/src/editor/Gui.cpp +++ b/src/editor/Gui.cpp @@ -13,6 +13,7 @@ #include #include #include "tinyfiledialogs.h" +#include // embedded binary data #include "fonts/robotomono.h" @@ -4360,4 +4361,4 @@ void Gui::checkFaceErrors() { void Gui::refresh() { reloadLimits(); checkValidHulls(); -} \ No newline at end of file +} diff --git a/src/editor/LightmapNode.cpp b/src/editor/LightmapNode.cpp index eb5327c5..b920d6b8 100644 --- a/src/editor/LightmapNode.cpp +++ b/src/editor/LightmapNode.cpp @@ -1,5 +1,6 @@ #include "LightmapNode.h" #include +#include LightmapNode::LightmapNode( int offX, int offY, int mapW, int mapH ) { diff --git a/src/editor/Renderer.cpp b/src/editor/Renderer.cpp index a2f03d61..8721497a 100644 --- a/src/editor/Renderer.cpp +++ b/src/editor/Renderer.cpp @@ -14,6 +14,7 @@ #include #include "globals.h" #include "NavMesh.h" +#include // everything except VIS, ENTITIES, MARKSURFS #define EDIT_MODEL_LUMPS (PLANES | TEXTURES | VERTICES | NODES | TEXINFO | FACES | LIGHTING | CLIPNODES | LEAVES | EDGES | SURFEDGES | MODELS) diff --git a/src/qtools/vis.cpp b/src/qtools/vis.cpp index e573bb3c..4ad483f4 100644 --- a/src/qtools/vis.cpp +++ b/src/qtools/vis.cpp @@ -2,6 +2,7 @@ #include "rad.h" #include "util.h" #include "globals.h" +#include #define MAX_MAP_LEAVES 65536 // set this to the largest value in any engine diff --git a/src/util/PolyOctree.cpp b/src/util/PolyOctree.cpp index 83a0d0cc..f665eb8c 100644 --- a/src/util/PolyOctree.cpp +++ b/src/util/PolyOctree.cpp @@ -1,5 +1,7 @@ #include "PolyOctree.h" #include "util.h" +#include +#include PolyOctant::PolyOctant(vec3 min, vec3 max) { this->min = min; @@ -96,4 +98,4 @@ void PolygonOctree::getPolysInRegion(PolyOctant* node, Polygon3D* poly, int curr getPolysInRegion(node->children[i], poly, currentDepth + 1, regionPolys); } } -} \ No newline at end of file +} diff --git a/src/util/Polygon3D.cpp b/src/util/Polygon3D.cpp index 6af7b17f..94ce5d7b 100644 --- a/src/util/Polygon3D.cpp +++ b/src/util/Polygon3D.cpp @@ -2,6 +2,7 @@ #include "util.h" #include "Renderer.h" #include "globals.h" +#include #define COLINEAR_EPSILON 0.125f #define SAME_VERT_EPSILON 0.125f diff --git a/src/util/util.cpp b/src/util/util.cpp index 6feb895b..9235d3dd 100644 --- a/src/util/util.cpp +++ b/src/util/util.cpp @@ -4,6 +4,11 @@ #include "colors.h" #include "mat4x4.h" #include "globals.h" +#include +#include +#include +#include + #ifdef WIN32 #include #include