From 275695a37ca6932bbb0be2c07503763fb0995ce0 Mon Sep 17 00:00:00 2001 From: Eric Wasylishen Date: Sat, 9 Mar 2024 22:07:55 -0700 Subject: [PATCH] qbsp: remove -transsky flag which was broken unknown what it was useful for --- common/bspfile.cc | 4 ++-- docs/qbsp.rst | 4 ---- include/common/bspfile.hh | 2 +- include/qbsp/qbsp.hh | 1 - qbsp/portals.cc | 2 +- qbsp/qbsp.cc | 1 - tests/test_common.cc | 2 +- tests/test_qbsp.cc | 6 +++--- 8 files changed, 8 insertions(+), 14 deletions(-) diff --git a/common/bspfile.cc b/common/bspfile.cc index 082d62e3..93a9732d 100644 --- a/common/bspfile.cc +++ b/common/bspfile.cc @@ -419,7 +419,7 @@ public: } bool portal_can_see_through( - const contentflags_t &contents0, const contentflags_t &contents1, bool transwater, bool transsky) const override + const contentflags_t &contents0, const contentflags_t &contents1, bool transwater) const override { contents_int_t bits_a = contents0.flags; contents_int_t bits_b = contents1.flags; @@ -1171,7 +1171,7 @@ struct gamedef_q2_t : public gamedef_t } bool portal_can_see_through( - const contentflags_t &contents0, const contentflags_t &contents1, bool, bool) const override + const contentflags_t &contents0, const contentflags_t &contents1, bool) const override { contents_int_t c0 = contents0.flags, c1 = contents1.flags; diff --git a/docs/qbsp.rst b/docs/qbsp.rst index 8bb858bc..6420059d 100644 --- a/docs/qbsp.rst +++ b/docs/qbsp.rst @@ -135,10 +135,6 @@ Options Computes portal information for opaque water -.. option:: -transsky - - Computes portal information for transparent sky - .. option:: -oldaxis Use the original QBSP texture alignment algorithm. Enabled by default. diff --git a/include/common/bspfile.hh b/include/common/bspfile.hh index 13c45568..830c953e 100644 --- a/include/common/bspfile.hh +++ b/include/common/bspfile.hh @@ -400,7 +400,7 @@ struct gamedef_t virtual bool contents_are_valid(const contentflags_t &contents, bool strict = true) const = 0; virtual int32_t contents_from_string(const std::string_view &str) const = 0; virtual bool portal_can_see_through( - const contentflags_t &contents0, const contentflags_t &contents1, bool transwater, bool transsky) const = 0; + const contentflags_t &contents0, const contentflags_t &contents1, bool transwater) const = 0; virtual bool contents_seals_map(const contentflags_t &contents) const = 0; virtual bool contents_are_opaque(const contentflags_t &contents, bool transwater) const = 0; enum class remap_type_t diff --git a/include/qbsp/qbsp.hh b/include/qbsp/qbsp.hh index 5bf4c09d..296919cc 100644 --- a/include/qbsp/qbsp.hh +++ b/include/qbsp/qbsp.hh @@ -186,7 +186,6 @@ public: setting_bool splitturb; setting_redirect splitspecial; setting_invertible_bool transwater; - setting_bool transsky; setting_bool notextures; setting_bool missing_textures_as_zero_size; setting_enum convertmapformat; diff --git a/qbsp/portals.cc b/qbsp/portals.cc index 64e8f962..99e4fa76 100644 --- a/qbsp/portals.cc +++ b/qbsp/portals.cc @@ -72,7 +72,7 @@ bool Portal_VisFlood(const portal_t *p) // Check per-game visibility return qbsp_options.target_game->portal_can_see_through( - contents0, contents1, qbsp_options.transwater.value(), qbsp_options.transsky.value()); + contents0, contents1, qbsp_options.transwater.value()); } /* diff --git a/qbsp/qbsp.cc b/qbsp/qbsp.cc index 7ecb9224..52cf1ab5 100644 --- a/qbsp/qbsp.cc +++ b/qbsp/qbsp.cc @@ -478,7 +478,6 @@ qbsp_settings::qbsp_settings() splitspecial{this, "splitspecial", {&splitsky, &splitturb}, &debugging_group, "doesn't combine sky and water faces into one large face (splitturb + splitsky)"}, transwater{this, "transwater", true, &common_format_group, "compute portal information for transparent water"}, - transsky{this, "transsky", false, &map_development_group, "compute portal information for transparent sky"}, notextures{this, "notex", false, &common_format_group, "write only placeholder textures to depend upon replacements, keep file sizes down, or to skirt copyrights"}, missing_textures_as_zero_size{this, "missing_textures_as_zero_size", false, &common_format_group, diff --git a/tests/test_common.cc b/tests/test_common.cc index 6aa71bb4..e00f4493 100644 --- a/tests/test_common.cc +++ b/tests/test_common.cc @@ -105,7 +105,7 @@ TEST_SUITE("common") CHECK(solid_empty_cluster.is_any_detail(game)); // check portal_can_see_through - CHECK(!game->portal_can_see_through(empty, solid_detail, true, true)); + CHECK(!game->portal_can_see_through(empty, solid_detail, true)); } } } diff --git a/tests/test_qbsp.cc b/tests/test_qbsp.cc index 224be03c..eb778de6 100644 --- a/tests/test_qbsp.cc +++ b/tests/test_qbsp.cc @@ -509,10 +509,10 @@ TEST_SUITE("mathlib") */ TEST_CASE("options_reset1" * doctest::test_suite("testmaps_q1")) { - LoadTestmap("qbsp_simple_sealed.map", {"-transsky"}); + LoadTestmap("qbsp_simple_sealed.map", {"-noskip"}); CHECK_FALSE(qbsp_options.forcegoodtree.value()); - CHECK(qbsp_options.transsky.value()); + CHECK(qbsp_options.noskip.value()); } TEST_CASE("options_reset2" * doctest::test_suite("testmaps_q1")) @@ -520,7 +520,7 @@ TEST_CASE("options_reset2" * doctest::test_suite("testmaps_q1")) LoadTestmap("qbsp_simple_sealed.map", {"-forcegoodtree"}); CHECK(qbsp_options.forcegoodtree.value()); - CHECK_FALSE(qbsp_options.transsky.value()); + CHECK_FALSE(qbsp_options.noskip.value()); } /**