diff --git a/bspinfo/bspinfo.cc b/bspinfo/bspinfo.cc index a4d448df..68f3aa8e 100644 --- a/bspinfo/bspinfo.cc +++ b/bspinfo/bspinfo.cc @@ -156,7 +156,6 @@ static void Base64EncodeTo(const uint8_t *data, size_t in_len, T p) if (in_len == 0) return; - size_t out_len = 4 * ((in_len + 2) / 3); size_t i; if (in_len == 1) { diff --git a/light/phong.cc b/light/phong.cc index 8a149b48..58bedfea 100644 --- a/light/phong.cc +++ b/light/phong.cc @@ -556,9 +556,6 @@ void CalculateVertexNormals(const mbsp_t *bsp) const qvec3f f_norm = Face_Normal(bsp, &f); // get the face normal // face tangent - auto texinfo = BSP_GetTexinfo(bsp, f.texinfo); - auto miptex = Face_RgbaMiptex(bsp, &f); - auto t1 = TexSpaceToWorld(bsp, &f); std::tuple tangents(t1.col(0).xyz(), qv::normalize(qv::cross(f_norm, t1.col(0).xyz()))); @@ -577,9 +574,6 @@ void CalculateVertexNormals(const mbsp_t *bsp) const qvec3f f2_norm = Face_Normal(bsp, f2); // f2 face tangent - auto f2_texinfo = BSP_GetTexinfo(bsp, f2->texinfo); - auto f2_miptex = Face_RgbaMiptex(bsp, f2); - auto t2 = TexSpaceToWorld(bsp, f2); std::tuple f2_tangents(t2.col(0).xyz(), qv::normalize(qv::cross(f2_norm, t2.col(0).xyz()))); diff --git a/qbsp/brush.cc b/qbsp/brush.cc index ed2bf35e..25a1d94c 100644 --- a/qbsp/brush.cc +++ b/qbsp/brush.cc @@ -280,13 +280,13 @@ void FixRotateOrigin(mapentity_t *entity) SetKeyValue(entity, "origin", qv::to_string(offset).c_str()); } -static bool DiscardHintSkipFace_Q1(const int hullnum, const hullbrush_t *hullbrush, const mtexinfo_t &texinfo) +static bool DiscardHintSkipFace_Q1(const mtexinfo_t &texinfo) { // anything texname other than "hint" in a hint brush is treated as "hintskip", and discarded return !string_iequals(map.miptexTextureName(texinfo.miptex), "hint"); } -static bool DiscardHintSkipFace_Q2(const int hullnum, const hullbrush_t *hullbrush, const mtexinfo_t &texinfo) +static bool DiscardHintSkipFace_Q2(const mtexinfo_t &texinfo) { // any face in a hint brush that isn't HINT are treated as "hintskip", and discarded return !(texinfo.flags.native & Q2_SURF_HINT); @@ -321,7 +321,7 @@ static face_t *CreateBrushFaces(const mapentity_t *src, hullbrush_t *hullbrush, /* Don't generate hintskip faces */ const mtexinfo_t &texinfo = map.mtexinfos.at(mapface.texinfo); - if (DiscardHintSkipFace(hullnum, hullbrush, texinfo)) + if (DiscardHintSkipFace(texinfo)) continue; }