From: Terri00 Date: Wed, 13 Mar 2019 17:07:21 +0000 (+0000) Subject: cxxopts X-Git-Url: https://harrygodden.com/git/?a=commitdiff_plain;h=209cda617112f047df2dd898e5ab39a619c70708;p=tar-legacy.git cxxopts --- diff --git a/MCDV/1whammy.png b/MCDV/1whammy.png new file mode 100644 index 0000000..d578c69 Binary files /dev/null and b/MCDV/1whammy.png differ diff --git a/MCDV/MCDV.vcxproj b/MCDV/MCDV.vcxproj index a3d13e1..08ebf0a 100644 --- a/MCDV/MCDV.vcxproj +++ b/MCDV/MCDV.vcxproj @@ -23,6 +23,7 @@ {3F5631FE-0F0C-4285-B301-66DA219121EC} MCDV 10.0.17134.0 + AutoRadar @@ -126,6 +127,7 @@ + @@ -165,7 +167,7 @@ - + diff --git a/MCDV/MCDV.vcxproj.filters b/MCDV/MCDV.vcxproj.filters index 13f3d0d..3921fe0 100644 --- a/MCDV/MCDV.vcxproj.filters +++ b/MCDV/MCDV.vcxproj.filters @@ -36,6 +36,9 @@ {57e9ec73-5c2f-4840-b186-2e1c3287cf65} + + {d74bb335-8fb5-4eb2-b1c1-4436cdc881cc} + @@ -128,6 +131,9 @@ OpenGL\stb + + Header Files\util + @@ -153,9 +159,6 @@ OpenGL\Shader Files - - OpenGL\Shader Files - OpenGL\Shader Files @@ -177,6 +180,9 @@ OpenGL\Shader Files + + OpenGL\Shader Files + diff --git a/MCDV/Shader.hpp b/MCDV/Shader.hpp index be0ed22..3d5ac10 100644 --- a/MCDV/Shader.hpp +++ b/MCDV/Shader.hpp @@ -13,16 +13,17 @@ bool USE_DEBUG = false; //Prototype functions -unsigned int LoadShader(std::string path, GLint shaderType); +unsigned int LoadShader(std::string path, GLint shaderType, int* load_success); class Shader { public: unsigned int programID; + bool compileUnsuccessful = false; + //Constructor Shader(std::string vertexPath, std::string fragmentPath); - Shader(std::string shaderName); ~Shader(); //Set active @@ -45,34 +46,16 @@ public: //Constructor Shader::Shader(std::string pVertexShader, std::string pFragmentShader) { - unsigned int vertexShader = LoadShader(pVertexShader, GL_VERTEX_SHADER); //Load the vertex shader - unsigned int fragmentShader = LoadShader(pFragmentShader, GL_FRAGMENT_SHADER); //Load the fragment shader - - this->programID = glCreateProgram(); - - //Attach the shaders to our program - glAttachShader(this->programID, vertexShader); - glAttachShader(this->programID, fragmentShader); - glLinkProgram(this->programID); - - int success; - char infoLog[512]; - - glGetProgramiv(this->programID, GL_LINK_STATUS, &success); - if (!success) { - glGetProgramInfoLog(this->programID, 512, NULL, infoLog); - std::cout << infoLog << std::endl; + int success = 1; + unsigned int vertexShader = LoadShader(pVertexShader, GL_VERTEX_SHADER, &success); //Load the vertex shader + unsigned int fragmentShader = LoadShader(pFragmentShader, GL_FRAGMENT_SHADER, &success); //Load the fragment shader + + if (success == 0) { + std::cout << "ERROR::SHADER::SOURCE_UNAVAILIBLE: " << pVertexShader << " | " << pFragmentShader << "\n"; + this->compileUnsuccessful = true; + return; } - glDeleteShader(vertexShader); - glDeleteShader(fragmentShader); -} - -Shader::Shader(std::string name) -{ - unsigned int vertexShader = LoadShader(name + ".hvert", GL_VERTEX_SHADER); //Load the vertex shader - unsigned int fragmentShader = LoadShader(name + ".hfrag", GL_FRAGMENT_SHADER); //Load the fragment shader - this->programID = glCreateProgram(); //Attach the shaders to our program @@ -80,12 +63,12 @@ Shader::Shader(std::string name) glAttachShader(this->programID, fragmentShader); glLinkProgram(this->programID); - int success; char infoLog[512]; glGetProgramiv(this->programID, GL_LINK_STATUS, &success); if (!success) { glGetProgramInfoLog(this->programID, 512, NULL, infoLog); + this->compileUnsuccessful = true; std::cout << infoLog << std::endl; } @@ -93,10 +76,16 @@ Shader::Shader(std::string name) glDeleteShader(fragmentShader); } -unsigned int LoadShader(std::string path, GLint shaderType) +unsigned int LoadShader(std::string path, GLint shaderType, int* load_success) { //Load the data into an std::string std::ifstream shaderFile(path); + + if (!shaderFile) { + *load_success = 0; + return 0; + } + std::string shaderString((std::istreambuf_iterator(shaderFile)), std::istreambuf_iterator()); diff --git a/MCDV/buyzone-bombtargets.png b/MCDV/buyzone-bombtargets.png new file mode 100644 index 0000000..03a4cbe Binary files /dev/null and b/MCDV/buyzone-bombtargets.png differ diff --git a/MCDV/cxxopts.hpp b/MCDV/cxxopts.hpp new file mode 100644 index 0000000..5e784a0 --- /dev/null +++ b/MCDV/cxxopts.hpp @@ -0,0 +1,2006 @@ +/* + +Copyright (c) 2014, 2015, 2016, 2017 Jarryd Beck + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. + +*/ + +#ifndef CXXOPTS_HPP_INCLUDED +#define CXXOPTS_HPP_INCLUDED + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#ifdef __cpp_lib_optional +#include +#define CXXOPTS_HAS_OPTIONAL +#endif + +namespace cxxopts +{ + static constexpr struct { + uint8_t major, minor, patch; + } version = { 2, 1, 0 }; +} + +//when we ask cxxopts to use Unicode, help strings are processed using ICU, +//which results in the correct lengths being computed for strings when they +//are formatted for the help output +//it is necessary to make sure that can be found by the +//compiler, and that icu-uc is linked in to the binary. + +#ifdef CXXOPTS_USE_UNICODE +#include + +namespace cxxopts +{ + typedef icu::UnicodeString String; + + inline + String + toLocalString(std::string s) + { + return icu::UnicodeString::fromUTF8(std::move(s)); + } + + class UnicodeStringIterator : public + std::iterator + { + public: + + UnicodeStringIterator(const icu::UnicodeString* string, int32_t pos) + : s(string) + , i(pos) + { + } + + value_type + operator*() const + { + return s->char32At(i); + } + + bool + operator==(const UnicodeStringIterator& rhs) const + { + return s == rhs.s && i == rhs.i; + } + + bool + operator!=(const UnicodeStringIterator& rhs) const + { + return !(*this == rhs); + } + + UnicodeStringIterator& + operator++() + { + ++i; + return *this; + } + + UnicodeStringIterator + operator+(int32_t v) + { + return UnicodeStringIterator(s, i + v); + } + + private: + const icu::UnicodeString* s; + int32_t i; + }; + + inline + String& + stringAppend(String&s, String a) + { + return s.append(std::move(a)); + } + + inline + String& + stringAppend(String& s, int n, UChar32 c) + { + for (int i = 0; i != n; ++i) + { + s.append(c); + } + + return s; + } + + template + String& + stringAppend(String& s, Iterator begin, Iterator end) + { + while (begin != end) + { + s.append(*begin); + ++begin; + } + + return s; + } + + inline + size_t + stringLength(const String& s) + { + return s.length(); + } + + inline + std::string + toUTF8String(const String& s) + { + std::string result; + s.toUTF8String(result); + + return result; + } + + inline + bool + empty(const String& s) + { + return s.isEmpty(); + } +} + +namespace std +{ + inline + cxxopts::UnicodeStringIterator + begin(const icu::UnicodeString& s) + { + return cxxopts::UnicodeStringIterator(&s, 0); + } + + inline + cxxopts::UnicodeStringIterator + end(const icu::UnicodeString& s) + { + return cxxopts::UnicodeStringIterator(&s, s.length()); + } +} + +//ifdef CXXOPTS_USE_UNICODE +#else + +namespace cxxopts +{ + typedef std::string String; + + template + T + toLocalString(T&& t) + { + return t; + } + + inline + size_t + stringLength(const String& s) + { + return s.length(); + } + + inline + String& + stringAppend(String&s, String a) + { + return s.append(std::move(a)); + } + + inline + String& + stringAppend(String& s, size_t n, char c) + { + return s.append(n, c); + } + + template + String& + stringAppend(String& s, Iterator begin, Iterator end) + { + return s.append(begin, end); + } + + template + std::string + toUTF8String(T&& t) + { + return std::forward(t); + } + + inline + bool + empty(const std::string& s) + { + return s.empty(); + } +} + +//ifdef CXXOPTS_USE_UNICODE +#endif + +namespace cxxopts +{ + namespace + { +#ifdef _WIN32 + const std::string LQUOTE("\'"); + const std::string RQUOTE("\'"); +#else + const std::string LQUOTE("�"); + const std::string RQUOTE("�"); +#endif + } + + class Value : public std::enable_shared_from_this + { + public: + + virtual ~Value() = default; + + virtual + std::shared_ptr + clone() const = 0; + + virtual void + parse(const std::string& text) const = 0; + + virtual void + parse() const = 0; + + virtual bool + has_default() const = 0; + + virtual bool + is_container() const = 0; + + virtual bool + has_implicit() const = 0; + + virtual std::string + get_default_value() const = 0; + + virtual std::string + get_implicit_value() const = 0; + + virtual std::shared_ptr + default_value(const std::string& value) = 0; + + virtual std::shared_ptr + implicit_value(const std::string& value) = 0; + + virtual bool + is_boolean() const = 0; + }; + + class OptionException : public std::exception + { + public: + OptionException(const std::string& message) + : m_message(message) + { + } + + virtual const char* + what() const noexcept + { + return m_message.c_str(); + } + + private: + std::string m_message; + }; + + class OptionSpecException : public OptionException + { + public: + + OptionSpecException(const std::string& message) + : OptionException(message) + { + } + }; + + class OptionParseException : public OptionException + { + public: + OptionParseException(const std::string& message) + : OptionException(message) + { + } + }; + + class option_exists_error : public OptionSpecException + { + public: + option_exists_error(const std::string& option) + : OptionSpecException(u8"Option " + LQUOTE + option + RQUOTE + u8" already exists") + { + } + }; + + class invalid_option_format_error : public OptionSpecException + { + public: + invalid_option_format_error(const std::string& format) + : OptionSpecException(u8"Invalid option format " + LQUOTE + format + RQUOTE) + { + } + }; + + class option_not_exists_exception : public OptionParseException + { + public: + option_not_exists_exception(const std::string& option) + : OptionParseException(u8"Option " + LQUOTE + option + RQUOTE + u8" does not exist") + { + } + }; + + class missing_argument_exception : public OptionParseException + { + public: + missing_argument_exception(const std::string& option) + : OptionParseException( + u8"Option " + LQUOTE + option + RQUOTE + u8" is missing an argument" + ) + { + } + }; + + class option_requires_argument_exception : public OptionParseException + { + public: + option_requires_argument_exception(const std::string& option) + : OptionParseException( + u8"Option " + LQUOTE + option + RQUOTE + u8" requires an argument" + ) + { + } + }; + + class option_not_has_argument_exception : public OptionParseException + { + public: + option_not_has_argument_exception + ( + const std::string& option, + const std::string& arg + ) + : OptionParseException( + u8"Option " + LQUOTE + option + RQUOTE + + u8" does not take an argument, but argument " + + LQUOTE + arg + RQUOTE + " given" + ) + { + } + }; + + class option_not_present_exception : public OptionParseException + { + public: + option_not_present_exception(const std::string& option) + : OptionParseException(u8"Option " + LQUOTE + option + RQUOTE + u8" not present") + { + } + }; + + class argument_incorrect_type : public OptionParseException + { + public: + argument_incorrect_type + ( + const std::string& arg + ) + : OptionParseException( + u8"Argument " + LQUOTE + arg + RQUOTE + u8" failed to parse" + ) + { + } + }; + + class option_required_exception : public OptionParseException + { + public: + option_required_exception(const std::string& option) + : OptionParseException( + u8"Option " + LQUOTE + option + RQUOTE + u8" is required but not present" + ) + { + } + }; + + namespace values + { + namespace + { + std::basic_regex integer_pattern + ("(-)?(0x)?([1-9a-zA-Z][0-9a-zA-Z]*)|((0x)?0)"); + std::basic_regex truthy_pattern + ("(t|T)(rue)?"); + std::basic_regex falsy_pattern + ("((f|F)(alse)?)?"); + } + + namespace detail + { + template + struct SignedCheck; + + template + struct SignedCheck + { + template + void + operator()(bool negative, U u, const std::string& text) + { + if (negative) + { + if (u > static_cast(-std::numeric_limits::min())) + { + throw argument_incorrect_type(text); + } + } + else + { + if (u > static_cast(std::numeric_limits::max())) + { + throw argument_incorrect_type(text); + } + } + } + }; + + template + struct SignedCheck + { + template + void + operator()(bool, U, const std::string&) {} + }; + + template + void + check_signed_range(bool negative, U value, const std::string& text) + { + SignedCheck::is_signed>()(negative, value, text); + } + } + + template + R + checked_negate(T&& t, const std::string&, std::true_type) + { + // if we got to here, then `t` is a positive number that fits into + // `R`. So to avoid MSVC C4146, we first cast it to `R`. + // See https://github.com/jarro2783/cxxopts/issues/62 for more details. + return -static_cast(t); + } + + template + T + checked_negate(T&&, const std::string& text, std::false_type) + { + throw argument_incorrect_type(text); + } + + template + void + integer_parser(const std::string& text, T& value) + { + std::smatch match; + std::regex_match(text, match, integer_pattern); + + if (match.length() == 0) + { + throw argument_incorrect_type(text); + } + + if (match.length(4) > 0) + { + value = 0; + return; + } + + using US = typename std::make_unsigned::type; + + constexpr auto umax = std::numeric_limits::max(); + constexpr bool is_signed = std::numeric_limits::is_signed; + const bool negative = match.length(1) > 0; + const uint8_t base = match.length(2) > 0 ? 16 : 10; + + auto value_match = match[3]; + + US result = 0; + + for (auto iter = value_match.first; iter != value_match.second; ++iter) + { + size_t digit = 0; + + if (*iter >= '0' && *iter <= '9') + { + digit = *iter - '0'; + } + else if (base == 16 && *iter >= 'a' && *iter <= 'f') + { + digit = *iter - 'a' + 10; + } + else if (base == 16 && *iter >= 'A' && *iter <= 'F') + { + digit = *iter - 'A' + 10; + } + else + { + throw argument_incorrect_type(text); + } + + if (umax - digit < result * base) + { + throw argument_incorrect_type(text); + } + + result = result * base + digit; + } + + detail::check_signed_range(negative, result, text); + + if (negative) + { + value = checked_negate(result, + text, + std::integral_constant()); + } + else + { + value = result; + } + } + + template + void stringstream_parser(const std::string& text, T& value) + { + std::stringstream in(text); + in >> value; + if (!in) { + throw argument_incorrect_type(text); + } + } + + inline + void + parse_value(const std::string& text, uint8_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, int8_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, uint16_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, int16_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, uint32_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, int32_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, uint64_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, int64_t& value) + { + integer_parser(text, value); + } + + inline + void + parse_value(const std::string& text, bool& value) + { + std::smatch result; + std::regex_match(text, result, truthy_pattern); + + if (!result.empty()) + { + value = true; + return; + } + + std::regex_match(text, result, falsy_pattern); + if (!result.empty()) + { + value = false; + return; + } + + throw argument_incorrect_type(text); + } + + inline + void + parse_value(const std::string& text, std::string& value) + { + value = text; + } + + // The fallback parser. It uses the stringstream parser to parse all types + // that have not been overloaded explicitly. It has to be placed in the + // source code before all other more specialized templates. + template + void + parse_value(const std::string& text, T& value) { + stringstream_parser(text, value); + } + + template + void + parse_value(const std::string& text, std::vector& value) + { + T v; + parse_value(text, v); + value.push_back(v); + } + +#ifdef CXXOPTS_HAS_OPTIONAL + template + void + parse_value(const std::string& text, std::optional& value) + { + T result; + parse_value(text, result); + value = std::move(result); + } +#endif + + template + struct type_is_container + { + static constexpr bool value = false; + }; + + template + struct type_is_container> + { + static constexpr bool value = true; + }; + + template + class abstract_value : public Value + { + using Self = abstract_value; + + public: + abstract_value() + : m_result(std::make_shared()) + , m_store(m_result.get()) + { + } + + abstract_value(T* t) + : m_store(t) + { + } + + virtual ~abstract_value() = default; + + abstract_value(const abstract_value& rhs) + { + if (rhs.m_result) + { + m_result = std::make_shared(); + m_store = m_result.get(); + } + else + { + m_store = rhs.m_store; + } + + m_default = rhs.m_default; + m_implicit = rhs.m_implicit; + m_default_value = rhs.m_default_value; + m_implicit_value = rhs.m_implicit_value; + } + + void + parse(const std::string& text) const + { + parse_value(text, *m_store); + } + + bool + is_container() const + { + return type_is_container::value; + } + + void + parse() const + { + parse_value(m_default_value, *m_store); + } + + bool + has_default() const + { + return m_default; + } + + bool + has_implicit() const + { + return m_implicit; + } + + std::shared_ptr + default_value(const std::string& value) + { + m_default = true; + m_default_value = value; + return shared_from_this(); + } + + std::shared_ptr + implicit_value(const std::string& value) + { + m_implicit = true; + m_implicit_value = value; + return shared_from_this(); + } + + std::string + get_default_value() const + { + return m_default_value; + } + + std::string + get_implicit_value() const + { + return m_implicit_value; + } + + bool + is_boolean() const + { + return std::is_same::value; + } + + const T& + get() const + { + if (m_store == nullptr) + { + return *m_result; + } + else + { + return *m_store; + } + } + + protected: + std::shared_ptr m_result; + T* m_store; + + bool m_default = false; + bool m_implicit = false; + + std::string m_default_value; + std::string m_implicit_value; + }; + + template + class standard_value : public abstract_value + { + public: + using abstract_value::abstract_value; + + std::shared_ptr + clone() const + { + return std::make_shared>(*this); + } + }; + + template <> + class standard_value : public abstract_value + { + public: + ~standard_value() = default; + + standard_value() + { + set_default_and_implicit(); + } + + standard_value(bool* b) + : abstract_value(b) + { + set_default_and_implicit(); + } + + std::shared_ptr + clone() const + { + return std::make_shared>(*this); + } + + private: + + void + set_default_and_implicit() + { + m_default = true; + m_default_value = "false"; + m_implicit = true; + m_implicit_value = "true"; + } + }; + } + + template + std::shared_ptr + value() + { + return std::make_shared>(); + } + + template + std::shared_ptr + value(T& t) + { + return std::make_shared>(&t); + } + + class OptionAdder; + + class OptionDetails + { + public: + OptionDetails + ( + const std::string& short_, + const std::string& long_, + const String& desc, + std::shared_ptr val + ) + : m_short(short_) + , m_long(long_) + , m_desc(desc) + , m_value(val) + , m_count(0) + { + } + + OptionDetails(const OptionDetails& rhs) + : m_desc(rhs.m_desc) + , m_count(rhs.m_count) + { + m_value = rhs.m_value->clone(); + } + + OptionDetails(OptionDetails&& rhs) = default; + + const String& + description() const + { + return m_desc; + } + + const Value& value() const { + return *m_value; + } + + std::shared_ptr + make_storage() const + { + return m_value->clone(); + } + + const std::string& + short_name() const + { + return m_short; + } + + const std::string& + long_name() const + { + return m_long; + } + + private: + std::string m_short; + std::string m_long; + String m_desc; + std::shared_ptr m_value; + int m_count; + }; + + struct HelpOptionDetails + { + std::string s; + std::string l; + String desc; + bool has_default; + std::string default_value; + bool has_implicit; + std::string implicit_value; + std::string arg_help; + bool is_container; + bool is_boolean; + }; + + struct HelpGroupDetails + { + std::string name; + std::string description; + std::vector options; + }; + + class OptionValue + { + public: + void + parse + ( + std::shared_ptr details, + const std::string& text + ) + { + ensure_value(details); + ++m_count; + m_value->parse(text); + } + + void + parse_default(std::shared_ptr details) + { + ensure_value(details); + m_value->parse(); + } + + size_t + count() const + { + return m_count; + } + + template + const T& + as() const + { +#ifdef CXXOPTS_NO_RTTI + return static_cast&>(*m_value).get(); +#else + return dynamic_cast&>(*m_value).get(); +#endif + } + + private: + void + ensure_value(std::shared_ptr details) + { + if (m_value == nullptr) + { + m_value = details->make_storage(); + } + } + + std::shared_ptr m_value; + size_t m_count = 0; + }; + + class KeyValue + { + public: + KeyValue(std::string key_, std::string value_) + : m_key(std::move(key_)) + , m_value(std::move(value_)) + { + } + + const + std::string& + key() const + { + return m_key; + } + + const std::string + value() const + { + return m_value; + } + + template + T + as() const + { + T result; + values::parse_value(m_value, result); + return result; + } + + private: + std::string m_key; + std::string m_value; + }; + + class ParseResult + { + public: + + ParseResult( + const std::unordered_map>&, + std::vector, + int&, const char**&); + + size_t + count(const std::string& o) const + { + auto iter = m_options.find(o); + if (iter == m_options.end()) + { + return 0; + } + + auto riter = m_results.find(iter->second); + + return riter->second.count(); + } + + const OptionValue& + operator[](const std::string& option) const + { + auto iter = m_options.find(option); + + if (iter == m_options.end()) + { + throw option_not_present_exception(option); + } + + auto riter = m_results.find(iter->second); + + return riter->second; + } + + const std::vector& + arguments() const + { + return m_sequential; + } + + private: + + OptionValue & + get_option(std::shared_ptr); + + void + parse(int& argc, const char**& argv); + + void + add_to_option(const std::string& option, const std::string& arg); + + bool + consume_positional(std::string a); + + void + parse_option + ( + std::shared_ptr value, + const std::string& name, + const std::string& arg = "" + ); + + void + parse_default(std::shared_ptr details); + + void + checked_parse_arg + ( + int argc, + const char* argv[], + int& current, + std::shared_ptr value, + const std::string& name + ); + + const std::unordered_map> + &m_options; + std::vector m_positional; + std::vector::iterator m_next_positional; + std::unordered_set m_positional_set; + std::unordered_map, OptionValue> m_results; + + std::vector m_sequential; + }; + + class Options + { + public: + + Options(std::string program, std::string help_string = "") + : m_program(std::move(program)) + , m_help_string(toLocalString(std::move(help_string))) + , m_custom_help("[OPTION...]") + , m_positional_help("positional parameters") + , m_show_positional(false) + , m_next_positional(m_positional.end()) + { + } + + Options& + positional_help(std::string help_text) + { + m_positional_help = std::move(help_text); + return *this; + } + + Options& + custom_help(std::string help_text) + { + m_custom_help = std::move(help_text); + return *this; + } + + Options& + show_positional_help() + { + m_show_positional = true; + return *this; + } + + ParseResult + parse(int& argc, const char**& argv); + + OptionAdder + add_options(std::string group = ""); + + void + add_option + ( + const std::string& group, + const std::string& s, + const std::string& l, + std::string desc, + std::shared_ptr value, + std::string arg_help + ); + + //parse positional arguments into the given option + void + parse_positional(std::string option); + + void + parse_positional(std::vector options); + + void + parse_positional(std::initializer_list options); + + std::string + help(const std::vector& groups = { "" }) const; + + const std::vector + groups() const; + + const HelpGroupDetails& + group_help(const std::string& group) const; + + private: + + void + add_one_option + ( + const std::string& option, + std::shared_ptr details + ); + + String + help_one_group(const std::string& group) const; + + void + generate_group_help + ( + String& result, + const std::vector& groups + ) const; + + void + generate_all_groups_help(String& result) const; + + std::string m_program; + String m_help_string; + std::string m_custom_help; + std::string m_positional_help; + bool m_show_positional; + + std::unordered_map> m_options; + std::vector m_positional; + std::vector::iterator m_next_positional; + std::unordered_set m_positional_set; + + //mapping from groups to help options + std::map m_help; + }; + + class OptionAdder + { + public: + + OptionAdder(Options& options, std::string group) + : m_options(options), m_group(std::move(group)) + { + } + + OptionAdder& + operator() + ( + const std::string& opts, + const std::string& desc, + std::shared_ptr value + = ::cxxopts::value(), + std::string arg_help = "" + ); + + private: + Options & m_options; + std::string m_group; + }; + + namespace + { + constexpr int OPTION_LONGEST = 30; + constexpr int OPTION_DESC_GAP = 2; + + std::basic_regex option_matcher + ("--([[:alnum:]][-_[:alnum:]]+)(=(.*))?|-([[:alnum:]]+)"); + + std::basic_regex option_specifier + ("(([[:alnum:]]),)?[ ]*([[:alnum:]][-_[:alnum:]]*)?"); + + String + format_option + ( + const HelpOptionDetails& o + ) + { + auto& s = o.s; + auto& l = o.l; + + String result = " "; + + if (s.size() > 0) + { + result += "-" + toLocalString(s) + ","; + } + else + { + result += " "; + } + + if (l.size() > 0) + { + result += " --" + toLocalString(l); + } + + auto arg = o.arg_help.size() > 0 ? toLocalString(o.arg_help) : "arg"; + + if (!o.is_boolean) + { + if (o.has_implicit) + { + result += " [=" + arg + "(=" + toLocalString(o.implicit_value) + ")]"; + } + else + { + result += " " + arg; + } + } + + return result; + } + + String + format_description + ( + const HelpOptionDetails& o, + size_t start, + size_t width + ) + { + auto desc = o.desc; + + if (o.has_default && (!o.is_boolean || o.default_value != "false")) + { + desc += toLocalString(" (default: " + o.default_value + ")"); + } + + String result; + + auto current = std::begin(desc); + auto startLine = current; + auto lastSpace = current; + + auto size = size_t{}; + + while (current != std::end(desc)) + { + if (*current == ' ') + { + lastSpace = current; + } + + if (size > width) + { + if (lastSpace == startLine) + { + stringAppend(result, startLine, current + 1); + stringAppend(result, "\n"); + stringAppend(result, start, ' '); + startLine = current + 1; + lastSpace = startLine; + } + else + { + stringAppend(result, startLine, lastSpace); + stringAppend(result, "\n"); + stringAppend(result, start, ' '); + startLine = lastSpace + 1; + } + size = 0; + } + else + { + ++size; + } + + ++current; + } + + //append whatever is left + stringAppend(result, startLine, current); + + return result; + } + } + + inline + ParseResult::ParseResult + ( + const std::unordered_map>& options, + std::vector positional, + int& argc, const char**& argv + ) + : m_options(options) + , m_positional(std::move(positional)) + , m_next_positional(m_positional.begin()) + { + parse(argc, argv); + } + + inline + OptionAdder + Options::add_options(std::string group) + { + return OptionAdder(*this, std::move(group)); + } + + inline + OptionAdder& + OptionAdder::operator() + ( + const std::string& opts, + const std::string& desc, + std::shared_ptr value, + std::string arg_help + ) + { + std::match_results result; + std::regex_match(opts.c_str(), result, option_specifier); + + if (result.empty()) + { + throw invalid_option_format_error(opts); + } + + const auto& short_match = result[2]; + const auto& long_match = result[3]; + + if (!short_match.length() && !long_match.length()) + { + throw invalid_option_format_error(opts); + } + else if (long_match.length() == 1 && short_match.length()) + { + throw invalid_option_format_error(opts); + } + + auto option_names = [] + ( + const std::sub_match& short_, + const std::sub_match& long_ + ) + { + if (long_.length() == 1) + { + return std::make_tuple(long_.str(), short_.str()); + } + else + { + return std::make_tuple(short_.str(), long_.str()); + } + }(short_match, long_match); + + m_options.add_option + ( + m_group, + std::get<0>(option_names), + std::get<1>(option_names), + desc, + value, + std::move(arg_help) + ); + + return *this; + } + + inline + void + ParseResult::parse_default(std::shared_ptr details) + { + m_results[details].parse_default(details); + } + + inline + void + ParseResult::parse_option + ( + std::shared_ptr value, + const std::string& /*name*/, + const std::string& arg + ) + { + auto& result = m_results[value]; + result.parse(value, arg); + + m_sequential.emplace_back(value->long_name(), arg); + } + + inline + void + ParseResult::checked_parse_arg + ( + int argc, + const char* argv[], + int& current, + std::shared_ptr value, + const std::string& name + ) + { + if (current + 1 >= argc) + { + if (value->value().has_implicit()) + { + parse_option(value, name, value->value().get_implicit_value()); + } + else + { + throw missing_argument_exception(name); + } + } + else + { + if (value->value().has_implicit()) + { + parse_option(value, name, value->value().get_implicit_value()); + } + else + { + parse_option(value, name, argv[current + 1]); + ++current; + } + } + } + + inline + void + ParseResult::add_to_option(const std::string& option, const std::string& arg) + { + auto iter = m_options.find(option); + + if (iter == m_options.end()) + { + throw option_not_exists_exception(option); + } + + parse_option(iter->second, option, arg); + } + + inline + bool + ParseResult::consume_positional(std::string a) + { + while (m_next_positional != m_positional.end()) + { + auto iter = m_options.find(*m_next_positional); + if (iter != m_options.end()) + { + auto& result = m_results[iter->second]; + if (!iter->second->value().is_container()) + { + if (result.count() == 0) + { + add_to_option(*m_next_positional, a); + ++m_next_positional; + return true; + } + else + { + ++m_next_positional; + continue; + } + } + else + { + add_to_option(*m_next_positional, a); + return true; + } + } + ++m_next_positional; + } + + return false; + } + + inline + void + Options::parse_positional(std::string option) + { + parse_positional(std::vector{std::move(option)}); + } + + inline + void + Options::parse_positional(std::vector options) + { + m_positional = std::move(options); + m_next_positional = m_positional.begin(); + + m_positional_set.insert(m_positional.begin(), m_positional.end()); + } + + inline + void + Options::parse_positional(std::initializer_list options) + { + parse_positional(std::vector(std::move(options))); + } + + inline + ParseResult + Options::parse(int& argc, const char**& argv) + { + ParseResult result(m_options, m_positional, argc, argv); + return result; + } + + inline + void + ParseResult::parse(int& argc, const char**& argv) + { + int current = 1; + + int nextKeep = 1; + + bool consume_remaining = false; + + while (current != argc) + { + if (strcmp(argv[current], "--") == 0) + { + consume_remaining = true; + ++current; + break; + } + + std::match_results result; + std::regex_match(argv[current], result, option_matcher); + + if (result.empty()) + { + //not a flag + + //if true is returned here then it was consumed, otherwise it is + //ignored + if (consume_positional(argv[current])) + { + } + else + { + argv[nextKeep] = argv[current]; + ++nextKeep; + } + //if we return from here then it was parsed successfully, so continue + } + else + { + //short or long option? + if (result[4].length() != 0) + { + const std::string& s = result[4]; + + for (std::size_t i = 0; i != s.size(); ++i) + { + std::string name(1, s[i]); + auto iter = m_options.find(name); + + if (iter == m_options.end()) + { + throw option_not_exists_exception(name); + } + + auto value = iter->second; + + if (i + 1 == s.size()) + { + //it must be the last argument + checked_parse_arg(argc, argv, current, value, name); + } + else if (value->value().has_implicit()) + { + parse_option(value, name, value->value().get_implicit_value()); + } + else + { + //error + throw option_requires_argument_exception(name); + } + } + } + else if (result[1].length() != 0) + { + const std::string& name = result[1]; + + auto iter = m_options.find(name); + + if (iter == m_options.end()) + { + throw option_not_exists_exception(name); + } + + auto opt = iter->second; + + //equals provided for long option? + if (result[2].length() != 0) + { + //parse the option given + + parse_option(opt, name, result[3]); + } + else + { + //parse the next argument + checked_parse_arg(argc, argv, current, opt, name); + } + } + + } + + ++current; + } + + for (auto& opt : m_options) + { + auto& detail = opt.second; + auto& value = detail->value(); + + auto& store = m_results[detail]; + + if (!store.count() && value.has_default()) { + parse_default(detail); + } + } + + if (consume_remaining) + { + while (current < argc) + { + if (!consume_positional(argv[current])) { + break; + } + ++current; + } + + //adjust argv for any that couldn't be swallowed + while (current != argc) { + argv[nextKeep] = argv[current]; + ++nextKeep; + ++current; + } + } + + argc = nextKeep; + + } + + inline + void + Options::add_option + ( + const std::string& group, + const std::string& s, + const std::string& l, + std::string desc, + std::shared_ptr value, + std::string arg_help + ) + { + auto stringDesc = toLocalString(std::move(desc)); + auto option = std::make_shared(s, l, stringDesc, value); + + if (s.size() > 0) + { + add_one_option(s, option); + } + + if (l.size() > 0) + { + add_one_option(l, option); + } + + //add the help details + auto& options = m_help[group]; + + options.options.emplace_back(HelpOptionDetails{ s, l, stringDesc, + value->has_default(), value->get_default_value(), + value->has_implicit(), value->get_implicit_value(), + std::move(arg_help), + value->is_container(), + value->is_boolean() }); + } + + inline + void + Options::add_one_option + ( + const std::string& option, + std::shared_ptr details + ) + { + auto in = m_options.emplace(option, details); + + if (!in.second) + { + throw option_exists_error(option); + } + } + + inline + String + Options::help_one_group(const std::string& g) const + { + typedef std::vector> OptionHelp; + + auto group = m_help.find(g); + if (group == m_help.end()) + { + return ""; + } + + OptionHelp format; + + size_t longest = 0; + + String result; + + if (!g.empty()) + { + result += toLocalString(" " + g + " options:\n"); + } + + for (const auto& o : group->second.options) + { + if (o.is_container && + m_positional_set.find(o.l) != m_positional_set.end() && + !m_show_positional) + { + continue; + } + + auto s = format_option(o); + longest = std::max(longest, stringLength(s)); + format.push_back(std::make_pair(s, String())); + } + + longest = std::min(longest, static_cast(OPTION_LONGEST)); + + //widest allowed description + auto allowed = size_t{ 76 } -longest - OPTION_DESC_GAP; + + auto fiter = format.begin(); + for (const auto& o : group->second.options) + { + if (o.is_container && + m_positional_set.find(o.l) != m_positional_set.end() && + !m_show_positional) + { + continue; + } + + auto d = format_description(o, longest + OPTION_DESC_GAP, allowed); + + result += fiter->first; + if (stringLength(fiter->first) > longest) + { + result += '\n'; + result += toLocalString(std::string(longest + OPTION_DESC_GAP, ' ')); + } + else + { + result += toLocalString(std::string(longest + OPTION_DESC_GAP - + stringLength(fiter->first), + ' ')); + } + result += d; + result += '\n'; + + ++fiter; + } + + return result; + } + + inline + void + Options::generate_group_help + ( + String& result, + const std::vector& print_groups + ) const + { + for (size_t i = 0; i != print_groups.size(); ++i) + { + const String& group_help_text = help_one_group(print_groups[i]); + if (empty(group_help_text)) + { + continue; + } + result += group_help_text; + if (i < print_groups.size() - 1) + { + result += '\n'; + } + } + } + + inline + void + Options::generate_all_groups_help(String& result) const + { + std::vector all_groups; + all_groups.reserve(m_help.size()); + + for (auto& group : m_help) + { + all_groups.push_back(group.first); + } + + generate_group_help(result, all_groups); + } + + inline + std::string + Options::help(const std::vector& help_groups) const + { + String result = m_help_string + "\nUsage:\n " + + toLocalString(m_program) + " " + toLocalString(m_custom_help); + + if (m_positional.size() > 0 && m_positional_help.size() > 0) { + result += " " + toLocalString(m_positional_help); + } + + result += "\n\n"; + + if (help_groups.size() == 0) + { + generate_all_groups_help(result); + } + else + { + generate_group_help(result, help_groups); + } + + return toUTF8String(result); + } + + inline + const std::vector + Options::groups() const + { + std::vector g; + + std::transform( + m_help.begin(), + m_help.end(), + std::back_inserter(g), + [](const std::map::value_type& pair) + { + return pair.first; + } + ); + + return g; + } + + inline + const HelpGroupDetails& + Options::group_help(const std::string& group) const + { + return m_help.at(group); + } + +} + +#endif //CXXOPTS_HPP_INCLUDED \ No newline at end of file diff --git a/MCDV/dds.hpp b/MCDV/dds.hpp index bb3b67f..0ea1ee0 100644 --- a/MCDV/dds.hpp +++ b/MCDV/dds.hpp @@ -98,6 +98,8 @@ uint8_t* compressImageDXT1(uint8_t* buf_RGB, uint32_t w, uint32_t h, uint32_t* c int blocks_x = w / 4; int blocks_y = h / 4; + std::cout << "Compressing DXT1 from RGB buffer\n"; + //Fill for (int y = 0; y < blocks_y; y++){ for (int x = 0; x < blocks_x; x++){ @@ -109,9 +111,9 @@ uint8_t* compressImageDXT1(uint8_t* buf_RGB, uint32_t w, uint32_t h, uint32_t* c uint8_t* src = new uint8_t[64]; //Create source RGBA buffer for (int _y = 0; _y < 4; _y++) { for (int _x = 0; _x < 4; _x++) { - src[(_x + (_y * 4)) * 4 + 0] = buf_RGB[(globalX + _x + ((globalY + _y) * w)) * 3 + 0]; - src[(_x + (_y * 4)) * 4 + 1] = buf_RGB[(globalX + _x + ((globalY + _y) * w)) * 3 + 1]; - src[(_x + (_y * 4)) * 4 + 2] = buf_RGB[(globalX + _x + ((globalY + _y) * w)) * 3 + 2]; + src[(_x + (_y * 4)) * 4 + 0] = buf_RGB[(globalX + _x + ((h - (globalY + _y)) * w)) * 3 + 0]; + src[(_x + (_y * 4)) * 4 + 1] = buf_RGB[(globalX + _x + ((h - (globalY + _y)) * w)) * 3 + 1]; + src[(_x + (_y * 4)) * 4 + 2] = buf_RGB[(globalX + _x + ((h - (globalY + _y)) * w)) * 3 + 2]; src[(_x + (_y * 4)) * 4 + 3] = 0xFF; } } diff --git a/MCDV/de_tavr_test.txt b/MCDV/de_tavr_test.txt new file mode 100644 index 0000000..efdf1b4 --- /dev/null +++ b/MCDV/de_tavr_test.txt @@ -0,0 +1,12 @@ +// TAVR - AUTO RADAR. v 2.0.0 +de_tavr_test +{ + "CTSpawn_x" "0.400000" + "CTSpawn_y" "0.060000" + "TSpawn_x" "0.300000" + "TSpawn_y" "0.880000" + "material" "overviews/de_tavr_test" + "pos_x" "-1832.000000" + "pos_y" "1728.000000" + "scale" "5.190000" +} diff --git a/MCDV/main.cpp b/MCDV/main.cpp index 66d5b94..8b70900 100644 --- a/MCDV/main.cpp +++ b/MCDV/main.cpp @@ -1,53 +1,123 @@ +// STDLib #include -#include "vmf.hpp" - -// OPENGL +// OPENGL related #include #include +#include #include "GLFWUtil.hpp" +// Engine header files #include "Shader.hpp" #include "Texture.hpp" -//#include "Camera.hpp" -//#include "Mesh.hpp" -//#include "GameObject.hpp" -//#include "TextFont.hpp" -//#include "Console.hpp" #include "FrameBuffer.hpp" -#include "interpolation.h" +// Valve header files +#include "vmf.hpp" -#include -#include -#include +// Util +#include "cxxopts.hpp" +#include "interpolation.h" +// Image stuff #define STBI_MSC_SECURE_CRT #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.h" -//#include "stb_image.h" #include "dds.hpp" +/* Grabs the currently bound framebuffer and saves it to a .png */ void render_to_png(int x, int y, const char* filepath){ void* data = malloc(4 * x * y); glReadPixels(0, 0, x, y, GL_RGBA, GL_UNSIGNED_BYTE, data); - if (data != 0) { - stbi_flip_vertically_on_write(true); - stbi_write_png(filepath, x, y, 4, data, x * 4); - } + stbi_flip_vertically_on_write(true); + stbi_write_png(filepath, x, y, 4, data, x * 4); + + free(data); +} + +/* Grabs the currently bound framebuffer and saves it to a .dds */ +void save_to_dds(int x, int y, const char* filepath) { + void* data = malloc(4 * x * y); + + glReadPixels(0, 0, x, y, GL_RGB, GL_UNSIGNED_BYTE, data); + + dds_write((uint8_t*)data, filepath, x, y, IMG::MODE_DXT1); + + free(data); } -int main(int argc, char* argv[]) { - int _w, _h, _nrc; - unsigned char* data = stbi_load("textures/test.jpg", &_w, &_h, &_nrc, 3); +/* Command line variables */ +std::string m_mapfile_path; +std::string m_game_path; + +//derived strings +std::string m_mapfile_name; +std::string m_overviews_folder; +std::string m_resources_folder; + +bool m_outputMasks; +bool m_onlyOutputMasks; + +uint32_t m_renderWidth; +uint32_t m_renderHeight; + +/* Main program */ +int app(int argc, const char** argv) { + cxxopts::Options options("AutoRadar", "Auto radar"); + options.add_options() + ("v,version", "Shows the software version") + ("g,game", "(REQUIRED) Specify game path", cxxopts::value()->default_value("")) + ("m,mapfile", "(REQUIRED) Specify the map file (vmf)", cxxopts::value()->default_value("")) + + ("d,dumpMasks", "Toggles whether auto radar should output mask images (resources/map_file.resources/)") + ("o,onlyMasks", "Specift whether auto radar should only output mask images and do nothing else (resources/map_file.resources)") + + ("w,width", "Render width in pixels (experimental)", cxxopts::value()->default_value("1024")) + ("h,height", "Render height in pixels (experimental)", cxxopts::value()->default_value("1024")) + + ("positional", "Positional parameters", cxxopts::value>()); + + options.parse_positional("positional"); + auto result = options.parse(argc, argv); + + /* Check required parameters */ + if (result.count("game")) m_game_path = result["game"].as(); + else throw cxxopts::option_required_exception("game"); - dds_write(data, "output.dds", _w, _h, IMG::MODE_DXT1); + if(result.count("mapfile")) m_mapfile_path = result["mapfile"].as(); + else if (result.count("positional")) { + auto& positional = result["positional"].as>(); + + m_mapfile_path = positional[0]; + } + else throw cxxopts::option_required_exception("mapfile"); // We need a map file - stbi_image_free(data); + //Clean paths to what we can deal with + m_mapfile_path = sutil::ReplaceAll(m_mapfile_path, "\\", "/"); + m_game_path = sutil::ReplaceAll(m_game_path, "\\", "/"); - return 0; + //Derive the ones + m_mapfile_name = split(m_mapfile_path, '/').back(); + m_overviews_folder = m_game_path + "/resource/overviews/"; + m_resources_folder = m_overviews_folder + m_mapfile_name + ".resources/"; + + /* Check the rest of the flags */ + m_onlyOutputMasks = result["onlyMasks"].as(); + m_outputMasks = result["dumpMasks"].as() || m_onlyOutputMasks; + + /* Render options */ + m_renderWidth = result["width"].as(); + m_renderHeight = result["height"].as(); + + std::cout << "Launching with options:\n"; + std::cout << " Render width: " << m_renderWidth << "\n"; + std::cout << " Render height: " << m_renderHeight << "\n"; + std::cout << " Save masks? " << (m_outputMasks ? "YES" : "NO") << "\n"; + std::cout << " Output to game? " << (!m_onlyOutputMasks ? "YES" : "NO") << "\n\n"; + std::cout << " Game path: " << m_game_path << "\n"; + std::cout << " Map path: " << m_mapfile_path << "\n"; std::cout << "Initializing OpenGL\n"; @@ -107,37 +177,59 @@ int main(int argc, char* argv[]) { #pragma region shader_compilation std::cout << "Compiling Shaders\n"; + std::cout << "______________________________________________________________\n\n"; // Internal engine shaders Shader shader_depth("shaders/depth.vs", "shaders/depth.fs"); Shader shader_unlit("shaders/unlit.vs", "shaders/unlit.fs"); // Compositing shaders - Shader shader_comp_main("shaders/fullscreenbase.vs", "shaders/ss_test.fs"); // le big one + Shader shader_comp_main("shaders/fullscreenbase.vs", "shaders/ss_comp_main.fs"); // le big one Shader shader_precomp_playspace("shaders/fullscreenbase.vs", "shaders/ss_precomp_playspace.fs"); // computes distance map Shader shader_precomp_objectives("shaders/fullscreenbase.vs", "shaders/ss_precomp_objectives.fs"); // computes distance map - std::cout << "Loading textures\n"; + if (shader_depth.compileUnsuccessful || + shader_unlit.compileUnsuccessful || + shader_comp_main.compileUnsuccessful || + shader_precomp_playspace.compileUnsuccessful || + shader_precomp_objectives.compileUnsuccessful) { + + std::cout << "______________________________________________________________\n"; + std::cout << "Shader compilation step failed.\n"; + glfwTerminate(); + return 1; + } + + std::cout << "______________________________________________________________\n"; + std::cout << "Shader compilation successful\n\n"; + + std::cout << "Loading textures... "; Texture tex_background = Texture("textures/grid.png"); Texture tex_gradient = Texture("textures/gradients/gradientmap_6.png", true); Texture tex_height_modulate = Texture("textures/modulate.png"); + std::cout << "done!\n\n"; + #pragma endregion #pragma region map_load - vmf::vmf vmf_main("sample_stuff/map_01.vmf"); + std::cout << "Loading map file...\n"; + + vmf::vmf vmf_main(m_mapfile_path + ".vmf"); - std::cout << "Generating Meshes\n"; + std::cout << "Generating Meshes...\n"; vmf_main.ComputeGLMeshes(); vmf_main.ComputeDisplacements(); std::vector tavr_solids = vmf_main.getAllBrushesInVisGroup("tavr_layout"); - + std::vector tavr_solids_funcbrush = vmf_main.getAllBrushesByClassName("func_brush"); std::vector tavr_buyzones = vmf_main.getAllBrushesByClassName("func_buyzone"); std::vector tavr_bombtargets = vmf_main.getAllBrushesByClassName("func_bomb_target"); + std::cout << "done!\n"; + #pragma region bounds std::cout << "Calculating bounds... "; @@ -164,45 +256,17 @@ int main(int argc, char* argv[]) { float render_ortho_scale = glm::round((mx_dist / 1024.0f) / 0.01f) * 0.01f * 1024.0f; // Take largest, scale up a tiny bit. Clamp to 1024 min. Do some rounding. glm::vec2 view_origin = glm::vec2(x_bounds_min - justify_x, y_bounds_max + justify_y); - std::cout << "done\n"; + std::cout << "done\n\n"; #pragma endregion #pragma endregion #pragma region OpenGLRender -#pragma region generate_radar_txt - - kv::DataBlock node_radar = kv::DataBlock(); - node_radar.name = "de_tavr_test"; - node_radar.Values.insert({ "material", "overviews/de_tavr_test" }); - - node_radar.Values.insert({ "pos_x", std::to_string(view_origin.x) }); - node_radar.Values.insert({ "pos_y", std::to_string(view_origin.y) }); - node_radar.Values.insert({ "scale", std::to_string(render_ortho_scale / 1024.0f) }); - - // Try resolve spawn positions - glm::vec3* loc_spawnCT = vmf_main.calculateSpawnLocation(vmf::team::counter_terrorist); - glm::vec3* loc_spawnT = vmf_main.calculateSpawnLocation(vmf::team::terrorist); - - if (loc_spawnCT != NULL) { - node_radar.Values.insert({ "CTSpawn_x", std::to_string(glm::round(remap(loc_spawnCT->x, view_origin.x, view_origin.x + render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); - node_radar.Values.insert({ "CTSpawn_y", std::to_string(glm::round(remap(loc_spawnCT->y, view_origin.y, view_origin.y - render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); - } - if (loc_spawnT != NULL) { - node_radar.Values.insert({ "TSpawn_x", std::to_string(glm::round(remap(loc_spawnT->x, view_origin.x, view_origin.x + render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); - node_radar.Values.insert({ "TSpawn_y", std::to_string(glm::round(remap(loc_spawnT->y, view_origin.y, view_origin.y - render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); - } - - std::ofstream out("de_tavr_test.txt"); - out << "// TAVR - AUTO RADAR. v 2.0.0\n"; - node_radar.Serialize(out); - out.close(); - -#pragma endregion + std::cout << "Starting OpenGL Render\n"; #pragma region render_playable_space - std::cout << "Rendering playable space..."; + std::cout << "Rendering playable space... "; fb_comp.Bind(); //Bind framebuffer @@ -232,6 +296,7 @@ int main(int argc, char* argv[]) { } } + fb_comp_1.Bind(); // Reverse rendering @@ -289,13 +354,14 @@ int main(int argc, char* argv[]) { glEnable(GL_DEPTH_TEST); - render_to_png(1024, 1024, "playable-space.png"); + if(m_outputMasks) + render_to_png(1024, 1024, "playable-space.png"); std::cout << "done!\n"; #pragma endregion #pragma region render_objectives - std::cout << "Rendering bombsites & buyzones space..."; + std::cout << "Rendering bombsites & buyzones space... "; fb_comp.Bind(); @@ -335,7 +401,8 @@ int main(int argc, char* argv[]) { mesh_screen_quad->Draw(); - render_to_png(1024, 1024, "buyzone-bombtargets.png"); + if (m_outputMasks) + render_to_png(1024, 1024, "buyzone-bombtargets.png"); glEnable(GL_DEPTH_TEST); std::cout << "done!\n"; @@ -365,20 +432,67 @@ int main(int argc, char* argv[]) { mesh_screen_quad->Draw(); - render_to_png(1024, 1024, "1whammy.png"); - - std::cout << "Done\n"; + std::cout << "done!\n"; #pragma endregion #pragma endregion #pragma region auto_export_game + if (!m_onlyOutputMasks) { + save_to_dds(1024, 1024, std::string(m_overviews_folder + m_mapfile_name + "_radar.dds").c_str()); + } + +#pragma region generate_radar_txt + + std::cout << "Generating radar .TXT... "; + + kv::DataBlock node_radar = kv::DataBlock(); + node_radar.name = m_mapfile_name; + node_radar.Values.insert({ "material", "overviews/" + m_mapfile_name }); + + node_radar.Values.insert({ "pos_x", std::to_string(view_origin.x) }); + node_radar.Values.insert({ "pos_y", std::to_string(view_origin.y) }); + node_radar.Values.insert({ "scale", std::to_string(render_ortho_scale / 1024.0f) }); + // Try resolve spawn positions + glm::vec3* loc_spawnCT = vmf_main.calculateSpawnLocation(vmf::team::counter_terrorist); + glm::vec3* loc_spawnT = vmf_main.calculateSpawnLocation(vmf::team::terrorist); + + if (loc_spawnCT != NULL) { + node_radar.Values.insert({ "CTSpawn_x", std::to_string(glm::round(remap(loc_spawnCT->x, view_origin.x, view_origin.x + render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); + node_radar.Values.insert({ "CTSpawn_y", std::to_string(glm::round(remap(loc_spawnCT->y, view_origin.y, view_origin.y - render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); + } + if (loc_spawnT != NULL) { + node_radar.Values.insert({ "TSpawn_x", std::to_string(glm::round(remap(loc_spawnT->x, view_origin.x, view_origin.x + render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); + node_radar.Values.insert({ "TSpawn_y", std::to_string(glm::round(remap(loc_spawnT->y, view_origin.y, view_origin.y - render_ortho_scale, 0.0f, 1.0f) / 0.01f) * 0.01f) }); + } + + std::ofstream out(std::string(m_overviews_folder + m_mapfile_name + ".txt").c_str()); + out << "// TAVR - AUTO RADAR. v 2.0.0\n"; + node_radar.Serialize(out); + out.close(); + + std::cout << "done!"; + +#pragma endregion #pragma endregion + std::cout << "\n- Radar generation successful... cleaning up. -\n"; + //Exit safely glfwTerminate(); - system("PAUSE"); return 0; +} + +/* Entry point */ +int main(int argc, const char** argv) { + try { + return app(argc, argv); + } + catch (cxxopts::OptionException& e) { + std::cerr << "Parse error: " << e.what() << "\n"; + } + + return 1; } \ No newline at end of file diff --git a/MCDV/playable-space.png b/MCDV/playable-space.png new file mode 100644 index 0000000..1e09fb6 Binary files /dev/null and b/MCDV/playable-space.png differ diff --git a/MCDV/sample_stuff/de_tavr_test.prt b/MCDV/sample_stuff/de_tavr_test.prt new file mode 100644 index 0000000..3a3e5b9 --- /dev/null +++ b/MCDV/sample_stuff/de_tavr_test.prt @@ -0,0 +1,435 @@ +PRT1 +152 +432 +4 0 4 (4096 3072 -128 ) (4096 3072 512 ) (3072 3072 512 ) (3072 3072 -128 ) +4 0 1 (3072 3072 -128 ) (3072 3072 512 ) (3072 4096 512 ) (3072 4096 -128 ) +4 1 10 (3072 3072 -128 ) (3072 3072 0 ) (2048 3072 0 ) (2048 3072 -128 ) +4 1 8 (2176 3072 512 ) (2048 3072 512 ) (2048 3072 0 ) (2176 3072 0 ) +4 1 7 (3072 3072 0 ) (3072 3072 512 ) (2176 3072 512 ) (2176 3072 0 ) +4 1 2 (2048 3072 -128 ) (2048 3072 512 ) (2048 4096 512 ) (2048 4096 -128 ) +4 2 13 (2048 3072 -128 ) (2048 3072 0 ) (1024 3072 0 ) (1024 3072 -128 ) +4 2 11 (2048 3072 0 ) (2048 3072 512 ) (1024 3072 512 ) (1024 3072 0 ) +4 2 3 (1024 3072 -128 ) (1024 3072 512 ) (1024 4096 512 ) (1024 4096 -128 ) +4 3 47 (0 3072 -128 ) (0 3072 512 ) (0 4096 512 ) (0 4096 -128 ) +4 3 18 (1024 3072 -128 ) (1024 3072 0 ) (0 3072 0 ) (0 3072 -128 ) +4 3 16 (256 3072 512 ) (0 3072 512 ) (0 3072 0 ) (256 3072 0 ) +4 3 14 (1024 3072 0 ) (1024 3072 512 ) (256 3072 512 ) (256 3072 0 ) +4 4 10 (3072 3072 0 ) (3072 3072 -128 ) (3072 2048 -128 ) (3072 2048 0 ) +4 4 7 (3072 3072 512 ) (3072 3072 0 ) (3072 2048 0 ) (3072 2048 512 ) +4 4 5 (4096 2048 -128 ) (4096 2048 512 ) (3072 2048 512 ) (3072 2048 -128 ) +4 5 22 (3072 1024 -128 ) (3072 1024 0 ) (3072 2048 0 ) (3072 2048 -128 ) +4 5 21 (3072 1024 0 ) (3072 1024 128 ) (3072 1664 128 ) (3072 1664 0 ) +4 5 20 (3072 1664 128 ) (3072 2048 128 ) (3072 2048 0 ) (3072 1664 0 ) +4 5 19 (3072 1024 128 ) (3072 1024 512 ) (3072 2048 512 ) (3072 2048 128 ) +4 5 6 (4096 1024 -128 ) (4096 1024 512 ) (3072 1024 512 ) (3072 1024 -128 ) +4 6 85 (4096 0 -128 ) (4096 0 512 ) (3072 0 512 ) (3072 0 -128 ) +4 6 27 (3072 0 -128 ) (3072 0 0 ) (3072 1024 0 ) (3072 1024 -128 ) +4 6 25 (3072 0 0 ) (3072 0 128 ) (3072 512 128 ) (3072 512 0 ) +4 6 24 (3072 512 128 ) (3072 1024 128 ) (3072 1024 0 ) (3072 512 0 ) +4 6 23 (3072 0 128 ) (3072 0 512 ) (3072 1024 512 ) (3072 1024 128 ) +4 7 20 (3072 2048 0 ) (3072 2048 128 ) (2176 2048 128 ) (2176 2048 0 ) +4 7 19 (3072 2048 128 ) (3072 2048 512 ) (2176 2048 512 ) (2176 2048 128 ) +4 7 10 (2176 3072 0 ) (3072 3072 0 ) (3072 2048 0 ) (2176 2048 0 ) +4 7 9 (2176 2048 128 ) (2176 2048 512 ) (2176 2560 512 ) (2176 2560 128 ) +4 7 8 (2176 3072 0 ) (2176 2560 0 ) (2176 2560 512 ) (2176 3072 512 ) +4 8 11 (2048 3072 512 ) (2048 3072 0 ) (2048 2560 0 ) (2048 2560 512 ) +4 8 10 (2048 2560 0 ) (2048 3072 0 ) (2176 3072 0 ) (2176 2560 0 ) +4 8 9 (2176 2560 128 ) (2176 2560 512 ) (2048 2560 512 ) (2048 2560 128 ) +4 9 19 (2176 2048 512 ) (2048 2048 512 ) (2048 2048 128 ) (2176 2048 128 ) +4 9 12 (2048 2048 128 ) (2048 2048 512 ) (2048 2560 512 ) (2048 2560 128 ) +4 10 22 (3072 2048 -128 ) (3072 2048 0 ) (2048 2048 0 ) (2048 2048 -128 ) +4 10 13 (2048 3072 0 ) (2048 3072 -128 ) (2048 2048 -128 ) (2048 2048 0 ) +4 11 14 (1024 2560 512 ) (1024 3072 512 ) (1024 3072 0 ) (1024 2560 0 ) +4 11 13 (1024 2560 0 ) (1024 3072 0 ) (2048 3072 0 ) (2048 2560 0 ) +4 11 12 (2048 2560 128 ) (2048 2560 512 ) (1024 2560 512 ) (1024 2560 128 ) +4 12 28 (2048 2048 128 ) (2048 2048 512 ) (1024 2048 512 ) (1024 2048 128 ) +4 12 15 (1024 2048 128 ) (1024 2048 512 ) (1024 2560 512 ) (1024 2560 128 ) +4 13 30 (2048 2048 -128 ) (2048 2048 0 ) (1024 2048 0 ) (1024 2048 -128 ) +4 13 18 (1024 2048 -128 ) (1024 2048 0 ) (1024 3072 0 ) (1024 3072 -128 ) +4 14 18 (256 3072 0 ) (1024 3072 0 ) (1024 2560 0 ) (256 2560 0 ) +4 14 16 (256 3072 0 ) (256 2560 0 ) (256 2560 512 ) (256 3072 512 ) +4 14 15 (1024 2560 512 ) (256 2560 512 ) (256 2560 128 ) (1024 2560 128 ) +4 15 31 (1024 2048 128 ) (1024 2048 512 ) (256 2048 512 ) (256 2048 128 ) +4 15 17 (256 2048 128 ) (256 2048 512 ) (256 2432 512 ) (256 2432 128 ) +4 15 16 (256 2432 512 ) (256 2560 512 ) (256 2560 128 ) (256 2432 128 ) +4 16 51 (0 2432 512 ) (0 3072 512 ) (0 3072 0 ) (0 2432 0 ) +4 16 18 (0 2432 0 ) (0 3072 0 ) (256 3072 0 ) (256 2432 0 ) +4 16 17 (256 2432 128 ) (256 2432 512 ) (0 2432 512 ) (0 2432 100 ) +4 17 52 (0 2048 100 ) (0 2048 512 ) (0 2432 512 ) (0 2432 100 ) +4 17 33 (0 2048 512 ) (0 2048 100 ) (256 2048 128 ) (256 2048 512 ) +4 18 55 (0 2048 -128 ) (0 2048 0 ) (0 3072 0 ) (0 3072 -128 ) +4 18 34 (1024 2048 -128 ) (1024 2048 0 ) (0 2048 0 ) (0 2048 -128 ) +4 19 28 (2048 2048 512 ) (2048 2048 128 ) (2048 1024 128 ) (2048 1024 512 ) +4 19 23 (3072 1024 128 ) (3072 1024 512 ) (2048 1024 512 ) (2048 1024 128 ) +4 19 21 (3072 1024 128 ) (2176 1024 128 ) (2176 1664 128 ) (3072 1664 128 ) +4 19 20 (2176 2048 128 ) (3072 2048 128 ) (3072 1664 128 ) (2176 1664 128 ) +4 20 22 (2176 2048 0 ) (3072 2048 0 ) (3072 1664 0 ) (2176 1664 0 ) +4 20 21 (2176 1664 0 ) (3072 1664 0 ) (3072 1664 128 ) (2176 1664 128 ) +4 21 24 (3072 1024 0 ) (3072 1024 128 ) (2176 1024 128 ) (2176 1024 0 ) +4 21 22 (2176 1664 0 ) (3072 1664 0 ) (3072 1024 0 ) (2176 1024 0 ) +4 22 30 (2048 2048 0 ) (2048 2048 -128 ) (2048 1024 -128 ) (2048 1024 0 ) +4 22 27 (3072 1024 -128 ) (3072 1024 0 ) (2048 1024 0 ) (2048 1024 -128 ) +4 23 88 (3072 0 128 ) (3072 0 512 ) (2048 0 512 ) (2048 0 128 ) +4 23 35 (2048 0 128 ) (2048 0 512 ) (2048 1024 512 ) (2048 1024 128 ) +4 23 26 (2432 0 128 ) (2048 0 128 ) (2048 128 128 ) (2432 128 128 ) +4 23 25 (3072 512 128 ) (3072 0 128 ) (2432 0 128 ) (2432 512 128 ) +4 23 24 (3072 1024 128 ) (3072 512 128 ) (2176 512 128 ) (2176 1024 128 ) +4 24 27 (2176 1024 0 ) (3072 1024 0 ) (3072 512 0 ) (2176 512 0 ) +4 24 25 (2432 512 0 ) (3072 512 0 ) (3072 512 128 ) (2432 512 128 ) +4 25 88 (3072 0 0 ) (3072 0 128 ) (2432 0 128 ) (2432 0 0 ) +4 25 27 (3072 0 0 ) (2432 0 0 ) (2432 512 0 ) (3072 512 0 ) +4 25 26 (2432 128 0 ) (2432 0 0 ) (2432 0 128 ) (2432 128 128 ) +4 26 88 (2432 0 128 ) (2048 0 128 ) (2048 0 0 ) (2432 0 0 ) +4 26 37 (2048 0 0 ) (2048 0 128 ) (2048 128 128 ) (2048 128 0 ) +4 26 27 (2432 0 0 ) (2048 0 0 ) (2048 128 0 ) (2432 128 0 ) +4 27 88 (3072 0 -128 ) (3072 0 0 ) (2048 0 0 ) (2048 0 -128 ) +4 27 40 (2048 0 -128 ) (2048 0 0 ) (2048 1024 0 ) (2048 1024 -128 ) +4 28 35 (2048 1024 128 ) (2048 1024 512 ) (1024 1024 512 ) (1024 1024 128 ) +4 28 31 (1024 2048 512 ) (1024 2048 128 ) (1024 1664 128 ) (1024 1664 512 ) +4 28 32 (1024 1664 128 ) (1024 1024 128 ) (1024 1024 512 ) (1024 1664 512 ) +4 28 29 (1024 1024 128 ) (1024 1664 128 ) (1792 1664 128 ) (1792 1024 128 ) +4 29 38 (1408 1024 128 ) (1024 1024 128 ) (1024 1024 0 ) (1408 1024 0 ) +4 29 36 (1792 1024 128 ) (1408 1024 128 ) (1408 1024 0 ) (1792 1024 0 ) +4 29 32 (1024 1664 0 ) (1024 1024 0 ) (1024 1024 128 ) (1024 1664 128 ) +4 29 30 (1792 1024 0 ) (1024 1024 0 ) (1024 1664 0 ) (1792 1664 0 ) +4 30 40 (2048 1024 -128 ) (2048 1024 0 ) (1024 1024 0 ) (1024 1024 -128 ) +4 30 34 (1024 2048 0 ) (1024 2048 -128 ) (1024 1024 -128 ) (1024 1024 0 ) +4 31 32 (256 1664 512 ) (256 1664 128 ) (1024 1664 128 ) (1024 1664 512 ) +4 31 33 (256 1664 128 ) (256 1664 512 ) (256 2048 512 ) (256 2048 128 ) +4 32 45 (1024 1024 0 ) (1024 1024 16 ) (256 1024 16 ) (256 1024 0 ) +4 32 42 (1024 1024 16 ) (1024 1024 64 ) (256 1024 64 ) (256 1024 16 ) +4 32 41 (1024 1024 64 ) (1024 1024 512 ) (256 1024 512 ) (256 1024 64 ) +4 32 34 (1024 1024 0 ) (256 1024 0 ) (256 1664 0 ) (1024 1664 0 ) +4 32 33 (256 1664 0 ) (256 1024 0 ) (256 1024 512 ) (256 1664 512 ) +4 33 61 (0 1024 0 ) (0 1024 512 ) (0 2048 512 ) (0 2048 0 ) +4 33 43 (0 1024 64 ) (0 1024 16 ) (96 1024 16 ) (96 1024 64 ) +4 33 42 (96 1024 16 ) (256 1024 16 ) (256 1024 64 ) (96 1024 64 ) +4 33 41 (256 1024 512 ) (0 1024 512 ) (0 1024 64 ) (256 1024 64 ) +4 33 34 (256 1024 0 ) (0 1024 0 ) (0 2048 0 ) (256 2048 0 ) +4 34 64 (0 1024 -128 ) (0 1024 0 ) (0 2048 0 ) (0 2048 -128 ) +4 34 46 (1024 1024 -128 ) (1024 1024 0 ) (0 1024 0 ) (0 1024 -128 ) +4 35 93 (1408 0 188.500000 ) (1024 0 188.500000 ) (1024 0 128 ) (1408 0 128 ) +4 35 92 (2048 0 128 ) (2048 0 188.500000 ) (1408 0 188.500000 ) (1408 0 128 ) +4 35 90 (1088 0 512 ) (1024 0 512 ) (1024 0 188.500000 ) (1088 0 188.500000 ) +4 35 89 (2048 0 188.500000 ) (2048 0 512 ) (1088 0 512 ) (1088 0 188.500000 ) +4 35 41 (1024 1024 512 ) (1024 1024 128 ) (1024 0 128 ) (1024 0 512 ) +4 35 39 (1408 0 128 ) (1024 0 128 ) (1024 640 128 ) (1408 640 128 ) +4 35 38 (1024 640 128 ) (1024 1024 128 ) (1408 1024 128 ) (1408 640 128 ) +4 35 37 (2048 0 128 ) (1408 0 128 ) (1408 128 128 ) (2048 128 128 ) +4 35 36 (1408 512 128 ) (1408 1024 128 ) (1792 1024 128 ) (1792 512 128 ) +4 36 40 (1408 1024 0 ) (1792 1024 0 ) (1792 512 0 ) (1408 512 0 ) +4 36 39 (1408 512 16 ) (1408 512 128 ) (1408 640 128 ) (1408 640 16 ) +4 36 38 (1408 1024 0 ) (1408 640 0 ) (1408 640 128 ) (1408 1024 128 ) +4 37 92 (2048 0 0 ) (2048 0 128 ) (1408 0 128 ) (1408 0 0 ) +4 37 40 (2048 128 0 ) (2048 0 0 ) (1408 0 0 ) (1408 128 0 ) +4 37 39 (1408 0 16 ) (1408 0 128 ) (1408 128 128 ) (1408 128 16 ) +4 38 45 (1024 1024 16 ) (1024 1024 0 ) (1024 640 0 ) (1024 640 16 ) +4 38 42 (1024 1024 64 ) (1024 1024 16 ) (1024 640 16 ) (1024 640 64 ) +4 38 41 (1024 1024 128 ) (1024 1024 64 ) (1024 640 64 ) (1024 640 128 ) +4 38 40 (1024 1024 0 ) (1408 1024 0 ) (1408 640 0 ) (1024 640 0 ) +4 38 39 (1408 640 16 ) (1408 640 128 ) (1024 640 128 ) (1024 640 16 ) +4 39 93 (1408 0 128 ) (1024 0 128 ) (1024 0 16 ) (1408 0 16 ) +4 39 42 (1024 0 16 ) (1024 0 64 ) (1024 640 64 ) (1024 640 16 ) +4 39 41 (1024 0 64 ) (1024 0 128 ) (1024 640 128 ) (1024 640 64 ) +4 40 95 (2048 0 -128 ) (2048 0 0 ) (1024 0 0 ) (1024 0 -128 ) +4 40 46 (1024 1024 0 ) (1024 1024 -128 ) (1024 0 -128 ) (1024 0 0 ) +4 41 101 (256 0 188.500000 ) (0 0 188.500000 ) (0 0 64 ) (256 0 64 ) +4 41 99 (1024 0 64 ) (1024 0 188.500000 ) (256 0 188.500000 ) (256 0 64 ) +4 41 98 (640 0 232 ) (0 0 232 ) (0 0 188.500000 ) (640 0 188.500000 ) +4 41 97 (1024 0 188.500000 ) (1024 0 232 ) (640 0 232 ) (640 0 188.500000 ) +4 41 96 (1024 0 232 ) (1024 0 512 ) (0 0 512 ) (0 0 232 ) +4 41 65 (0 0 64 ) (0 0 512 ) (0 1024 512 ) (0 1024 64 ) +4 41 43 (0 768 64 ) (0 1024 64 ) (96 1024 64 ) (96 768 64 ) +4 41 44 (96 0 64 ) (0 0 64 ) (0 352 64 ) (96 352 64 ) +4 41 42 (1024 0 64 ) (96 0 64 ) (96 1024 64 ) (1024 1024 64 ) +4 42 101 (256 0 64 ) (96 0 64 ) (96 0 16 ) (256 0 16 ) +4 42 99 (1024 0 16 ) (1024 0 64 ) (256 0 64 ) (256 0 16 ) +4 42 45 (1024 1024 16 ) (1024 640 16 ) (256 640 16 ) (256 1024 16 ) +4 42 43 (96 1024 16 ) (96 768 16 ) (96 768 64 ) (96 1024 64 ) +4 42 44 (96 352 16 ) (96 0 16 ) (96 0 64 ) (96 352 64 ) +4 43 66 (0 768 64 ) (0 1024 64 ) (0 1024 16 ) (0 768 16 ) +4 44 101 (96 0 64 ) (0 0 64 ) (0 0 16 ) (96 0 16 ) +4 44 67 (0 0 16 ) (0 0 64 ) (0 352 64 ) (0 352 16 ) +4 45 46 (256 640 0 ) (256 1024 0 ) (1024 1024 0 ) (1024 640 0 ) +4 46 103 (1024 0 -128 ) (1024 0 0 ) (0 0 0 ) (0 0 -128 ) +4 46 71 (0 0 -128 ) (0 0 0 ) (0 1024 0 ) (0 1024 -128 ) +4 47 55 (0 3072 -128 ) (0 3072 0 ) (-1024 3072 0 ) (-1024 3072 -128 ) +4 47 53 (-768 3072 512 ) (-1024 3072 512 ) (-1024 3072 0 ) (-768 3072 0 ) +4 47 51 (0 3072 0 ) (0 3072 512 ) (-768 3072 512 ) (-768 3072 0 ) +4 47 48 (-1024 3072 -128 ) (-1024 3072 512 ) (-1024 4096 512 ) (-1024 4096 -128 ) +4 48 59 (-1024 3072 -128 ) (-1024 3072 0 ) (-2048 3072 0 ) (-2048 3072 -128 ) +4 48 56 (-1024 3072 0 ) (-1024 3072 512 ) (-1408 3072 512 ) (-1408 3072 0 ) +4 48 58 (-1408 3072 512 ) (-2048 3072 512 ) (-2048 3072 0 ) (-1408 3072 0 ) +4 48 49 (-2048 3072 -128 ) (-2048 3072 512 ) (-2048 4096 512 ) (-2048 4096 -128 ) +4 49 60 (-2048 3072 -128 ) (-2048 3072 512 ) (-3072 3072 512 ) (-3072 3072 -128 ) +4 49 50 (-3072 3072 -128 ) (-3072 3072 512 ) (-3072 4096 512 ) (-3072 4096 -128 ) +4 50 82 (-3072 3072 -128 ) (-3072 3072 512 ) (-4096 3072 512 ) (-4096 3072 -128 ) +4 51 55 (-768 2432 0 ) (-768 3072 0 ) (0 3072 0 ) (0 2432 0 ) +4 51 54 (-768 2432 16 ) (-768 2432 512 ) (-768 2944 512 ) (-768 2944 16 ) +4 51 53 (-768 3072 512 ) (-768 3072 0 ) (-768 2944 0 ) (-768 2944 512 ) +4 51 52 (0 2432 512 ) (-768 2432 512 ) (-768 2432 16 ) (0 2432 100 ) +4 52 61 (0 2048 100 ) (0 2048 512 ) (-768 2048 512 ) (-768 2048 16 ) +4 52 54 (-768 2048 16 ) (-768 2048 512 ) (-768 2432 512 ) (-768 2432 16 ) +4 53 56 (-1024 3072 512 ) (-1024 3072 0 ) (-1024 2944 0 ) (-1024 2944 512 ) +4 53 55 (-1024 2944 0 ) (-1024 3072 0 ) (-768 3072 0 ) (-768 2944 0 ) +4 53 54 (-768 2944 16 ) (-768 2944 512 ) (-1024 2944 512 ) (-1024 2944 16 ) +4 54 62 (-1024 2048 512 ) (-1024 2048 16 ) (-768 2048 16 ) (-768 2048 512 ) +4 54 57 (-1024 2048 16 ) (-1024 2048 512 ) (-1024 2944 512 ) (-1024 2944 16 ) +4 55 64 (0 2048 -128 ) (0 2048 0 ) (-1024 2048 0 ) (-1024 2048 -128 ) +4 55 59 (-1024 3072 0 ) (-1024 3072 -128 ) (-1024 2048 -128 ) (-1024 2048 0 ) +4 56 59 (-1408 3072 0 ) (-1024 3072 0 ) (-1024 2944 0 ) (-1408 2944 0 ) +4 56 57 (-1408 2944 512 ) (-1408 2944 16 ) (-1024 2944 16 ) (-1024 2944 512 ) +4 56 58 (-1408 3072 0 ) (-1408 2944 0 ) (-1408 2944 512 ) (-1408 3072 512 ) +4 57 72 (-1024 2048 16 ) (-1024 2048 512 ) (-1408 2048 512 ) (-1408 2048 16 ) +4 57 58 (-1408 2048 16 ) (-1408 2048 512 ) (-1408 2944 512 ) (-1408 2944 16 ) +4 58 74 (-1408 2048 512 ) (-2048 2048 512 ) (-2048 2048 0 ) (-1408 2048 0 ) +4 58 60 (-2048 2048 0 ) (-2048 2048 512 ) (-2048 3072 512 ) (-2048 3072 0 ) +4 58 59 (-2048 2048 0 ) (-2048 3072 0 ) (-1408 3072 0 ) (-1408 2048 0 ) +4 59 75 (-1024 2048 -128 ) (-1024 2048 0 ) (-2048 2048 0 ) (-2048 2048 -128 ) +4 59 60 (-2048 2048 -128 ) (-2048 2048 0 ) (-2048 3072 0 ) (-2048 3072 -128 ) +4 60 82 (-3072 3072 512 ) (-3072 3072 -128 ) (-3072 2048 -128 ) (-3072 2048 512 ) +4 60 76 (-2048 2048 -128 ) (-2048 2048 512 ) (-3072 2048 512 ) (-3072 2048 -128 ) +4 61 66 (0 1024 16 ) (0 1024 64 ) (-512 1024 64 ) (-512 1024 16 ) +4 61 68 (-512 1024 64 ) (-768 1024 64 ) (-768 1024 16 ) (-512 1024 16 ) +4 61 65 (0 1024 64 ) (0 1024 512 ) (-768 1024 512 ) (-768 1024 64 ) +4 61 64 (0 1024 0 ) (-768 1024 0 ) (-768 2048 0 ) (0 2048 0 ) +4 61 62 (-768 1920 16 ) (-768 1920 512 ) (-768 2048 512 ) (-768 2048 16 ) +4 61 63 (-768 1920 0 ) (-768 1024 0 ) (-768 1024 512 ) (-768 1920 512 ) +4 62 72 (-1024 2048 512 ) (-1024 2048 16 ) (-1024 1920 16 ) (-1024 1920 512 ) +4 62 63 (-768 1920 16 ) (-768 1920 512 ) (-1024 1920 512 ) (-1024 1920 16 ) +4 63 73 (-1024 1920 0 ) (-1024 1024 0 ) (-1024 1024 512 ) (-1024 1920 512 ) +4 63 69 (-1024 1024 16 ) (-1024 1024 0 ) (-768 1024 0 ) (-768 1024 16 ) +4 63 68 (-1024 1024 64 ) (-1024 1024 16 ) (-768 1024 16 ) (-768 1024 64 ) +4 63 65 (-768 1024 512 ) (-1024 1024 512 ) (-1024 1024 64 ) (-768 1024 64 ) +4 63 64 (-768 1024 0 ) (-1024 1024 0 ) (-1024 1920 0 ) (-768 1920 0 ) +4 64 75 (-1024 2048 0 ) (-1024 2048 -128 ) (-1024 1024 -128 ) (-1024 1024 0 ) +4 64 71 (0 1024 -128 ) (0 1024 0 ) (-1024 1024 0 ) (-1024 1024 -128 ) +4 65 120 (0 0 64 ) (0 0 512 ) (-1024 0 512 ) (-1024 0 64 ) +4 65 77 (-1024 0 64 ) (-1024 0 512 ) (-1024 1024 512 ) (-1024 1024 64 ) +4 65 66 (0 1024 64 ) (0 768 64 ) (-512 768 64 ) (-512 1024 64 ) +4 65 67 (0 352 64 ) (0 0 64 ) (-512 0 64 ) (-512 352 64 ) +4 65 68 (-512 0 64 ) (-1024 0 64 ) (-1024 1024 64 ) (-512 1024 64 ) +4 66 68 (-512 1024 16 ) (-512 768 16 ) (-512 768 64 ) (-512 1024 64 ) +4 67 120 (0 0 16 ) (0 0 64 ) (-512 0 64 ) (-512 0 16 ) +4 67 70 (-384 0 16 ) (-512 0 16 ) (-512 128 16 ) (-384 128 16 ) +4 67 68 (-512 352 16 ) (-512 0 16 ) (-512 0 64 ) (-512 352 64 ) +4 68 120 (-512 0 64 ) (-1024 0 64 ) (-1024 0 16 ) (-512 0 16 ) +4 68 77 (-1024 0 16 ) (-1024 0 64 ) (-1024 1024 64 ) (-1024 1024 16 ) +4 68 70 (-512 0 16 ) (-1024 0 16 ) (-1024 128 16 ) (-512 128 16 ) +4 68 69 (-1024 128 16 ) (-1024 1024 16 ) (-768 1024 16 ) (-768 128 16 ) +4 69 79 (-1024 128 16 ) (-1024 972.212952 16 ) (-1024 972.213013 0 ) (-1024 128 0 ) +4 69 78 (-1024 972.212952 16 ) (-1024 1024 16 ) (-1024 1024 0 ) (-1024 972.213013 0 ) +4 69 71 (-768 128 0 ) (-1024 128 0 ) (-1024 1024 0 ) (-768 1024 0 ) +4 69 70 (-1024 128 0 ) (-768 128 0 ) (-768 128 16 ) (-1024 128 16 ) +4 70 123 (-729.076416 0 16 ) (-1024 0 16 ) (-1024 0 0 ) (-729.076416 0 0 ) +4 70 122 (-384 0 16 ) (-729.076416 0 16 ) (-729.076416 0 0 ) (-384 0 0 ) +4 70 79 (-1024 0 0 ) (-1024 0 16 ) (-1024 128 16 ) (-1024 128 0 ) +4 70 71 (-384 0 0 ) (-1024 0 0 ) (-1024 128 0 ) (-384 128 0 ) +4 71 126 (0 0 -128 ) (0 0 0 ) (-1024 0 0 ) (-1024 0 -128 ) +4 71 80 (-1024 0 -128 ) (-1024 0 0 ) (-1024 1024 0 ) (-1024 1024 -128 ) +4 72 73 (-1408 1920 512 ) (-1408 1920 16 ) (-1024 1920 16 ) (-1024 1920 512 ) +4 72 74 (-1408 1920 16 ) (-1408 1920 512 ) (-1408 2048 512 ) (-1408 2048 16 ) +4 73 78 (-1024 1024 0 ) (-1024 1024 16 ) (-1408 1024 16 ) (-1408 1024 0 ) +4 73 77 (-1024 1024 16 ) (-1024 1024 512 ) (-1408 1024 512 ) (-1408 1024 16 ) +4 73 75 (-1024 1920 0 ) (-1024 1024 0 ) (-1408 1024 0 ) (-1408 1920 0 ) +4 73 74 (-1408 1920 0 ) (-1408 1024 0 ) (-1408 1024 512 ) (-1408 1920 512 ) +4 74 78 (-2048 1024 16 ) (-2048 1024 0 ) (-1408 1024 0 ) (-1408 1024 16 ) +4 74 77 (-1408 1024 512 ) (-2048 1024 512 ) (-2048 1024 16 ) (-1408 1024 16 ) +4 74 76 (-2048 2048 512 ) (-2048 2048 0 ) (-2048 1024 0 ) (-2048 1024 512 ) +4 74 75 (-2048 1024 0 ) (-2048 2048 0 ) (-1408 2048 0 ) (-1408 1024 0 ) +4 75 80 (-1024 1024 -128 ) (-1024 1024 0 ) (-2048 1024 0 ) (-2048 1024 -128 ) +4 75 76 (-2048 2048 0 ) (-2048 2048 -128 ) (-2048 1024 -128 ) (-2048 1024 0 ) +4 76 83 (-3072 1024 -128 ) (-3072 1024 512 ) (-3072 2048 512 ) (-3072 2048 -128 ) +4 76 81 (-2048 1024 -128 ) (-2048 1024 512 ) (-3072 1024 512 ) (-3072 1024 -128 ) +4 77 127 (-1024 0 16 ) (-1024 0 512 ) (-2048 0 512 ) (-2048 0 16 ) +4 77 81 (-2048 1024 512 ) (-2048 1024 16 ) (-2048 0 16 ) (-2048 0 512 ) +4 77 79 (-1024 972.213013 16 ) (-1024 0 16 ) (-1028.923584 0 16 ) (-1512.570068 483.644958 16 ) +5 77 78 (-2048 1024 16 ) (-1024 1024 16 ) (-1024 972.213013 16 ) (-1996.216919 0 16 ) (-2048 0 16 ) +4 78 129 (-1996.216919 0 16 ) (-2048 0 16 ) (-2048 0 0 ) (-1996.216919 0 0 ) +4 78 81 (-2048 1024 16 ) (-2048 1024 0 ) (-2048 0 0 ) (-2048 0 16 ) +5 78 80 (-2048 1024 0 ) (-1024 1024 0 ) (-1024 972.213013 0 ) (-1996.216919 0 0 ) (-2048 0 0 ) +4 78 79 (-1512.570801 483.645721 0 ) (-1024 972.214539 0 ) (-1024 972.215027 16 ) (-1512.570923 483.645905 16 ) +4 79 131 (-1024 0 0 ) (-1024 0 16 ) (-1028.923584 0 16 ) (-1028.923584 0 0 ) +4 79 80 (-1024 972.213013 0 ) (-1024 0 0 ) (-1028.923584 0 0 ) (-1512.570068 483.644958 0 ) +4 80 132 (-1024 0 -128 ) (-1024 0 0 ) (-2048 0 0 ) (-2048 0 -128 ) +4 80 81 (-2048 1024 0 ) (-2048 1024 -128 ) (-2048 0 -128 ) (-2048 0 0 ) +4 81 136 (-2048 0 -128 ) (-2048 0 0 ) (-3072 0 0 ) (-3072 0 -128 ) +4 81 134 (-2048 0 0 ) (-2048 0 16 ) (-3072 0 16 ) (-3072 0 0 ) +4 81 133 (-2048 0 16 ) (-2048 0 512 ) (-3072 0 512 ) (-3072 0 16 ) +4 81 84 (-3072 0 -128 ) (-3072 0 512 ) (-3072 1024 512 ) (-3072 1024 -128 ) +4 82 83 (-3072 2048 -128 ) (-3072 2048 512 ) (-4096 2048 512 ) (-4096 2048 -128 ) +4 83 84 (-3072 1024 -128 ) (-3072 1024 512 ) (-4096 1024 512 ) (-4096 1024 -128 ) +4 84 145 (-3072 0 -128 ) (-3072 0 512 ) (-4096 0 512 ) (-4096 0 -128 ) +4 85 88 (3072 0 512 ) (3072 0 -128 ) (3072 -1024 -128 ) (3072 -1024 512 ) +4 85 86 (4096 -1024 -128 ) (4096 -1024 512 ) (3072 -1024 512 ) (3072 -1024 -128 ) +4 86 104 (3072 -2048 -128 ) (3072 -2048 512 ) (3072 -1024 512 ) (3072 -1024 -128 ) +4 86 87 (4096 -2048 -128 ) (4096 -2048 512 ) (3072 -2048 512 ) (3072 -2048 -128 ) +4 87 116 (4096 -3072 -128 ) (4096 -3072 512 ) (3072 -3072 512 ) (3072 -3072 -128 ) +4 87 105 (3072 -3072 -128 ) (3072 -3072 512 ) (3072 -2048 512 ) (3072 -2048 -128 ) +4 88 104 (3072 -1024 -128 ) (3072 -1024 512 ) (2048 -1024 512 ) (2048 -1024 -128 ) +4 88 95 (2048 0 0 ) (2048 0 -128 ) (2048 -1024 -128 ) (2048 -1024 0 ) +4 88 92 (2048 0 188.500000 ) (2048 0 0 ) (2048 -1024 0 ) (2048 -1024 188.500000 ) +4 88 89 (2048 0 512 ) (2048 0 188.500000 ) (2048 -1024 188.500000 ) (2048 -1024 512 ) +4 89 106 (2048 -1024 188.500000 ) (2048 -1024 512 ) (1088 -1024 512 ) (1088 -1024 188.500000 ) +4 89 93 (1088 -128 188.500000 ) (1088 0 188.500000 ) (1408 0 188.500000 ) (1408 -128 188.500000 ) +4 89 94 (1408 -1024 188.500000 ) (1088 -1024 188.500000 ) (1088 -128 188.500000 ) (1408 -128 188.500000 ) +4 89 92 (2048 -1024 188.500000 ) (1408 -1024 188.500000 ) (1408 0 188.500000 ) (2048 0 188.500000 ) +4 89 91 (1088 -1024 232 ) (1088 -1024 512 ) (1088 -384 512 ) (1088 -384 232 ) +4 89 90 (1088 0 188.500000 ) (1088 -384 188.500000 ) (1088 -384 512 ) (1088 0 512 ) +4 90 97 (1024 0 232 ) (1024 0 188.500000 ) (1024 -384 188.500000 ) (1024 -384 232 ) +4 90 96 (1024 -384 512 ) (1024 0 512 ) (1024 0 232 ) (1024 -384 232 ) +4 90 93 (1024 -128 188.500000 ) (1024 0 188.500000 ) (1088 0 188.500000 ) (1088 -128 188.500000 ) +4 90 94 (1024 -384 188.500000 ) (1024 -128 188.500000 ) (1088 -128 188.500000 ) (1088 -384 188.500000 ) +4 90 91 (1088 -384 232 ) (1088 -384 512 ) (1024 -384 512 ) (1024 -384 232 ) +4 91 107 (1088 -1024 512 ) (1024 -1024 512 ) (1024 -1024 232 ) (1088 -1024 232 ) +4 91 96 (1024 -1024 232 ) (1024 -1024 512 ) (1024 -384 512 ) (1024 -384 232 ) +4 92 109 (2048 -1024 0 ) (2048 -1024 188.500000 ) (1408 -1024 188.500000 ) (1408 -1024 0 ) +4 92 95 (1408 0 0 ) (2048 0 0 ) (2048 -1024 0 ) (1408 -1024 0 ) +4 92 93 (1408 -128 16 ) (1408 -128 188.500000 ) (1408 0 188.500000 ) (1408 0 16 ) +4 92 94 (1408 -128 0 ) (1408 -1024 0 ) (1408 -1024 188.500000 ) (1408 -128 188.500000 ) +4 93 99 (1024 -128 188.500000 ) (1024 0 188.500000 ) (1024 0 16 ) (1024 -128 16 ) +4 93 94 (1408 -128 16 ) (1408 -128 188.500000 ) (1024 -128 188.500000 ) (1024 -128 16 ) +4 94 109 (1408 -1024 188.500000 ) (1024 -1024 188.500000 ) (1024 -1024 0 ) (1408 -1024 0 ) +4 94 100 (1024 -1024 0 ) (1024 -1024 188.500000 ) (1024 -128 188.500000 ) (1024 -128 0 ) +4 94 95 (1024 -1024 0 ) (1024 -128 0 ) (1408 -128 0 ) (1408 -1024 0 ) +4 95 109 (2048 -1024 -128 ) (2048 -1024 0 ) (1024 -1024 0 ) (1024 -1024 -128 ) +4 95 103 (1024 -1024 -128 ) (1024 -1024 0 ) (1024 0 0 ) (1024 0 -128 ) +4 96 125 (0 -896 232 ) (0 -1024 232 ) (0 -1024 512 ) (0 -896 512 ) +4 96 120 (0 0 512 ) (0 0 232 ) (0 -896 232 ) (0 -896 512 ) +4 96 110 (1024 -1024 232 ) (1024 -1024 512 ) (0 -1024 512 ) (0 -1024 232 ) +4 96 98 (0 -896 232 ) (0 0 232 ) (640 0 232 ) (640 -896 232 ) +4 96 97 (640 -384 232 ) (640 0 232 ) (1024 0 232 ) (1024 -384 232 ) +4 97 99 (640 0 188.500000 ) (1024 0 188.500000 ) (1024 -128 188.500000 ) (640 -128 188.500000 ) +4 97 100 (1024 -128 188.500000 ) (1024 -384 188.500000 ) (640 -384 188.500000 ) (640 -128 188.500000 ) +4 97 98 (640 0 188.500000 ) (640 -384 188.500000 ) (640 -384 232 ) (640 0 232 ) +4 98 120 (0 0 232 ) (0 0 188.500000 ) (0 -896 188.500000 ) (0 -896 232 ) +4 98 101 (0 -512 188.500000 ) (0 0 188.500000 ) (256 0 188.500000 ) (256 -512 188.500000 ) +4 98 102 (0 -896 188.500000 ) (0 -512 188.500000 ) (256 -512 188.500000 ) (256 -896 188.500000 ) +4 98 99 (256 0 188.500000 ) (640 0 188.500000 ) (640 -128 188.500000 ) (256 -128 188.500000 ) +4 98 100 (640 -128 188.500000 ) (640 -896 188.500000 ) (256 -896 188.500000 ) (256 -128 188.500000 ) +4 99 101 (256 -128 16 ) (256 -128 188.500000 ) (256 0 188.500000 ) (256 0 16 ) +4 99 100 (256 -128 188.500000 ) (256 -128 16 ) (1024 -128 16 ) (1024 -128 188.500000 ) +4 100 113 (1024 -1024 0 ) (1024 -1024 188.500000 ) (256 -1024 188.500000 ) (256 -1024 0 ) +4 100 103 (1024 -1024 0 ) (256 -1024 0 ) (256 -128 0 ) (1024 -128 0 ) +4 100 101 (256 -512 16 ) (256 -512 188.500000 ) (256 -128 188.500000 ) (256 -128 16 ) +4 100 102 (256 -512 0 ) (256 -1024 0 ) (256 -1024 188.500000 ) (256 -512 188.500000 ) +4 101 120 (0 0 188.500000 ) (0 0 16 ) (0 -512 16 ) (0 -512 188.500000 ) +4 101 102 (256 -512 16 ) (256 -512 188.500000 ) (0 -512 188.500000 ) (0 -512 16 ) +4 102 124 (0 -896 0 ) (0 -1024 0 ) (0 -1024 188.500000 ) (0 -896 188.500000 ) +4 102 121 (0 -512 0 ) (0 -896 0 ) (0 -896 16 ) (0 -512 16 ) +4 102 120 (0 -896 16 ) (0 -896 188.500000 ) (0 -512 188.500000 ) (0 -512 16 ) +4 102 113 (256 -1024 188.500000 ) (0 -1024 188.500000 ) (0 -1024 0 ) (256 -1024 0 ) +4 102 103 (256 -1024 0 ) (0 -1024 0 ) (0 -512 0 ) (256 -512 0 ) +4 103 126 (0 0 0 ) (0 0 -128 ) (0 -1024 -128 ) (0 -1024 0 ) +4 103 113 (1024 -1024 -128 ) (1024 -1024 0 ) (0 -1024 0 ) (0 -1024 -128 ) +4 104 109 (2048 -1024 188.500000 ) (2048 -1024 -128 ) (2048 -2048 -128 ) (2048 -2048 188.500000 ) +4 104 106 (2048 -1024 512 ) (2048 -1024 188.500000 ) (2048 -2048 188.500000 ) (2048 -2048 512 ) +4 104 105 (3072 -2048 -128 ) (3072 -2048 512 ) (2048 -2048 512 ) (2048 -2048 -128 ) +4 105 117 (3072 -3072 -128 ) (3072 -3072 512 ) (2048 -3072 512 ) (2048 -3072 -128 ) +4 105 114 (2048 -3072 -128 ) (2048 -3072 512 ) (2048 -2048 512 ) (2048 -2048 -128 ) +4 106 114 (2048 -2048 188.500000 ) (2048 -2048 512 ) (1088 -2048 512 ) (1088 -2048 188.500000 ) +4 106 109 (2048 -2048 188.500000 ) (1088 -2048 188.500000 ) (1088 -1024 188.500000 ) (2048 -1024 188.500000 ) +4 106 107 (1088 -1280 232 ) (1088 -1280 512 ) (1088 -1024 512 ) (1088 -1024 232 ) +4 106 108 (1088 -1280 188.500000 ) (1088 -2048 188.500000 ) (1088 -2048 512 ) (1088 -1280 512 ) +4 107 110 (1024 -1024 512 ) (1024 -1024 232 ) (1024 -1280 232 ) (1024 -1280 512 ) +4 107 108 (1088 -1280 232 ) (1088 -1280 512 ) (1024 -1280 512 ) (1024 -1280 232 ) +4 108 114 (1088 -2048 512 ) (1024 -2048 512 ) (1024 -2048 188.500000 ) (1088 -2048 188.500000 ) +4 108 111 (1024 -1280 188.500000 ) (1024 -2048 188.500000 ) (1024 -2048 232 ) (1024 -1280 232 ) +4 108 110 (1024 -2048 232 ) (1024 -2048 512 ) (1024 -1280 512 ) (1024 -1280 232 ) +4 108 109 (1088 -2048 188.500000 ) (1024 -2048 188.500000 ) (1024 -1280 188.500000 ) (1088 -1280 188.500000 ) +4 109 114 (2048 -2048 -128 ) (2048 -2048 188.500000 ) (1024 -2048 188.500000 ) (1024 -2048 -128 ) +4 109 113 (1024 -1024 188.500000 ) (1024 -1024 -128 ) (1024 -2048 -128 ) (1024 -2048 188.500000 ) +4 110 138 (0 -1280 512 ) (0 -1024 512 ) (0 -1024 232 ) (0 -1280 232 ) +4 110 139 (0 -2048 232 ) (0 -2048 512 ) (0 -1280 512 ) (0 -1280 232 ) +4 110 115 (1024 -2048 232 ) (1024 -2048 512 ) (0 -2048 512 ) (0 -2048 232 ) +4 110 112 (640 -2048 232 ) (0 -2048 232 ) (0 -1280 232 ) (640 -1280 232 ) +4 110 111 (1024 -2048 232 ) (640 -2048 232 ) (640 -1280 232 ) (1024 -1280 232 ) +4 111 115 (1024 -2048 188.500000 ) (1024 -2048 232 ) (640 -2048 232 ) (640 -2048 188.500000 ) +4 111 113 (1024 -1280 188.500000 ) (1024 -2048 188.500000 ) (640 -2048 188.500000 ) (640 -1280 188.500000 ) +4 111 112 (640 -1280 188.500000 ) (640 -2048 188.500000 ) (640 -2048 232 ) (640 -1280 232 ) +4 112 139 (0 -2048 188.500000 ) (0 -2048 232 ) (0 -1280 232 ) (0 -1280 188.500000 ) +4 112 115 (640 -2048 232 ) (0 -2048 232 ) (0 -2048 188.500000 ) (640 -2048 188.500000 ) +4 112 113 (640 -2048 188.500000 ) (0 -2048 188.500000 ) (0 -1280 188.500000 ) (640 -1280 188.500000 ) +4 113 137 (0 -1280 188.500000 ) (0 -1024 188.500000 ) (0 -1024 -128 ) (0 -1280 -128 ) +4 113 139 (0 -2048 -128 ) (0 -2048 188.500000 ) (0 -1280 188.500000 ) (0 -1280 -128 ) +4 113 115 (1024 -2048 -128 ) (1024 -2048 188.500000 ) (0 -2048 188.500000 ) (0 -2048 -128 ) +4 114 118 (2048 -3072 -128 ) (2048 -3072 512 ) (1024 -3072 512 ) (1024 -3072 -128 ) +4 114 115 (1024 -2048 512 ) (1024 -2048 -128 ) (1024 -3072 -128 ) (1024 -3072 512 ) +4 115 140 (0 -3072 -128 ) (0 -3072 512 ) (0 -2048 512 ) (0 -2048 -128 ) +4 115 119 (1024 -3072 -128 ) (1024 -3072 512 ) (0 -3072 512 ) (0 -3072 -128 ) +4 116 117 (3072 -3072 512 ) (3072 -3072 -128 ) (3072 -4096 -128 ) (3072 -4096 512 ) +4 117 118 (2048 -3072 512 ) (2048 -3072 -128 ) (2048 -4096 -128 ) (2048 -4096 512 ) +4 118 119 (1024 -4096 -128 ) (1024 -4096 512 ) (1024 -3072 512 ) (1024 -3072 -128 ) +4 119 148 (0 -4096 -128 ) (0 -4096 512 ) (0 -3072 512 ) (0 -3072 -128 ) +4 120 127 (-1024 0 512 ) (-1024 0 16 ) (-1024 -896 16 ) (-1024 -896 512 ) +4 120 125 (0 -896 232 ) (0 -896 512 ) (-1024 -896 512 ) (-1024 -896 29 ) +3 120 124 (0 -896 16 ) (0 -896 192 ) (-938.666687 -896 16 ) +4 120 123 (-1024 -4.923584 16 ) (-1024 0 16 ) (-729.076416 0 16 ) (-879 -149.923096 16 ) +5 120 122 (-384 -896 16 ) (-1024 -896 16 ) (-1024 -294.922424 16 ) (-729.076416 0 16 ) (-384 0 16 ) +4 120 121 (0 -896 16 ) (-384 -896 16 ) (-384 -512 16 ) (0 -512 16 ) +4 121 126 (0 -512 0 ) (0 -896 0 ) (-384 -896 0 ) (-384 -512 0 ) +4 121 124 (-384 -896 0 ) (0 -896 0 ) (0 -896 16 ) (-384 -896 16 ) +4 121 122 (-384 -512 0 ) (-384 -896 0 ) (-384 -896 16 ) (-384 -512 16 ) +4 122 128 (-1024 -294.922394 0 ) (-1024 -896 0 ) (-1024 -896 16 ) (-1024 -294.922424 16 ) +5 122 126 (-1024 -896 0 ) (-1024 -294.922424 0 ) (-729.076416 0 0 ) (-384 0 0 ) (-384 -896 0 ) +4 122 124 (-1024 -896 0 ) (-384 -896 0 ) (-384 -896 16 ) (-938.666687 -896 16 ) +4 122 123 (-729.074951 0 0 ) (-879 -149.923492 0 ) (-879 -149.923492 16 ) (-729.074951 0 16 ) +4 123 131 (-1024 0 16 ) (-1024 0 0 ) (-1024 -4.923586 0 ) (-1024 -4.923584 16 ) +4 123 126 (-1024 -4.923584 0 ) (-1024 0 0 ) (-729.076416 0 0 ) (-879 -149.923096 0 ) +3 124 137 (0 -1024 0 ) (0 -1024 192 ) (-1024 -1024 0 ) +4 124 126 (0 -1024 0 ) (-1024 -1024 0 ) (-1024 -896 0 ) (0 -896 0 ) +4 125 138 (0 -1024 232 ) (0 -1024 512 ) (-1024 -1024 512 ) (-1024 -1024 29 ) +4 125 127 (-1024 -1024 29 ) (-1024 -1024 512 ) (-1024 -896 512 ) (-1024 -896 29 ) +4 126 137 (0 -1024 -128 ) (0 -1024 0 ) (-1024 -1024 0 ) (-1024 -1024 -128 ) +4 126 132 (-1024 0 0 ) (-1024 0 -128 ) (-1024 -1024 -128 ) (-1024 -1024 0 ) +4 127 141 (-1024 -1024 16 ) (-1024 -1024 512 ) (-2048 -1024 512 ) (-2048 -1024 16 ) +4 127 133 (-2048 -1024 16 ) (-2048 -1024 512 ) (-2048 0 512 ) (-2048 0 16 ) +3 127 131 (-1028.923584 0 16 ) (-1024 0 16 ) (-1024 -4.923586 16 ) +4 127 130 (-1753.080566 -1024 16 ) (-2048 -1024 16 ) (-2048 -429.081421 16 ) (-1603.080078 -874 16 ) +3 127 129 (-2048 -51.782837 16 ) (-2048 0 16 ) (-1996.216919 0 16 ) +3 127 128 (-1024 -1024 16 ) (-1753.080566 -1024 16 ) (-1024 -294.922394 16 ) +4 128 141 (-1024 -1024 0 ) (-1024 -1024 16 ) (-1753.080566 -1024 16 ) (-1753.080566 -1024 0 ) +3 128 132 (-1024 -1024 0 ) (-1753.080566 -1024 0 ) (-1024 -294.922394 0 ) +4 128 130 (-1603.080322 -874 0 ) (-1753.080933 -1024 0 ) (-1753.080811 -1024 16 ) (-1603.080078 -874 16 ) +4 129 134 (-2048 -51.782837 16 ) (-2048 0 16 ) (-2048 0 0 ) (-2048 -51.782860 0 ) +3 129 132 (-2048 -51.782837 0 ) (-2048 0 0 ) (-1996.216919 0 0 ) +4 130 141 (-1753.080566 -1024 16 ) (-2048 -1024 16 ) (-2048 -1024 0 ) (-1753.080566 -1024 0 ) +4 130 135 (-2048 -1024 0 ) (-2048 -1024 16 ) (-2048 -429.081421 16 ) (-2048 -429.081421 0 ) +4 130 132 (-1753.080566 -1024 0 ) (-2048 -1024 0 ) (-2048 -429.081421 0 ) (-1603.080078 -874 0 ) +3 131 132 (-1028.923584 0 0 ) (-1024 0 0 ) (-1024 -4.923586 0 ) +4 132 141 (-1024 -1024 -128 ) (-1024 -1024 0 ) (-2048 -1024 0 ) (-2048 -1024 -128 ) +4 132 136 (-2048 -1024 -128 ) (-2048 -1024 0 ) (-2048 0 0 ) (-2048 0 -128 ) +4 133 145 (-3072 0 512 ) (-3072 0 16 ) (-3072 -1024 16 ) (-3072 -1024 512 ) +4 133 142 (-2048 -1024 16 ) (-2048 -1024 512 ) (-3072 -1024 512 ) (-3072 -1024 16 ) +4 133 135 (-2048 -429.081421 16 ) (-2048 -1024 16 ) (-3020.221191 -1024 16 ) (-2236.649902 -240.432007 16 ) +5 133 134 (-3072 -1024 16 ) (-3072 0 16 ) (-2048 0 16 ) (-2048 -51.782860 16 ) (-3020.221191 -1024 16 ) +4 134 145 (-3072 0 16 ) (-3072 0 0 ) (-3072 -1024 0 ) (-3072 -1024 16 ) +4 134 142 (-3020.221191 -1024 16 ) (-3072 -1024 16 ) (-3072 -1024 0 ) (-3020.221191 -1024 0 ) +5 134 136 (-3072 -1024 0 ) (-3072 0 0 ) (-2048 0 0 ) (-2048 -51.782860 0 ) (-3020.221191 -1024 0 ) +4 134 135 (-3020.222656 -1024 0 ) (-2236.650635 -240.431274 0 ) (-2236.652832 -240.429214 16 ) (-3020.226563 -1024 16 ) +4 135 142 (-2048 -1024 0 ) (-2048 -1024 16 ) (-3020.221191 -1024 16 ) (-3020.221191 -1024 0 ) +4 135 136 (-2048 -429.081421 0 ) (-2048 -1024 0 ) (-3020.221191 -1024 0 ) (-2236.649902 -240.432007 0 ) +4 136 145 (-3072 0 0 ) (-3072 0 -128 ) (-3072 -1024 -128 ) (-3072 -1024 0 ) +4 136 142 (-2048 -1024 -128 ) (-2048 -1024 0 ) (-3072 -1024 0 ) (-3072 -1024 -128 ) +4 137 141 (-1024 -1024 0 ) (-1024 -1024 -128 ) (-1024 -1280 -128 ) (-1024 -1280 0 ) +4 137 139 (-1024 -1280 -128 ) (0 -1280 -128 ) (0 -1280 192 ) (-1024 -1280 0 ) +4 138 141 (-1024 -1024 512 ) (-1024 -1024 29 ) (-1024 -1280 29 ) (-1024 -1280 512 ) +4 138 139 (0 -1280 232 ) (0 -1280 512 ) (-1024 -1280 512 ) (-1024 -1280 29 ) +4 139 141 (-1024 -1280 -128 ) (-1024 -2048 -128 ) (-1024 -2048 512 ) (-1024 -1280 512 ) +4 139 140 (0 -2048 -128 ) (0 -2048 512 ) (-1024 -2048 512 ) (-1024 -2048 -128 ) +4 140 148 (0 -3072 -128 ) (0 -3072 512 ) (-1024 -3072 512 ) (-1024 -3072 -128 ) +4 140 143 (-1024 -3072 -128 ) (-1024 -3072 512 ) (-1024 -2048 512 ) (-1024 -2048 -128 ) +4 141 143 (-1024 -2048 -128 ) (-1024 -2048 512 ) (-2048 -2048 512 ) (-2048 -2048 -128 ) +4 141 142 (-2048 -1024 512 ) (-2048 -1024 -128 ) (-2048 -2048 -128 ) (-2048 -2048 512 ) +4 142 146 (-3072 -2048 -128 ) (-3072 -2048 512 ) (-3072 -1024 512 ) (-3072 -1024 -128 ) +4 142 144 (-2048 -2048 -128 ) (-2048 -2048 512 ) (-3072 -2048 512 ) (-3072 -2048 -128 ) +4 143 149 (-1024 -3072 -128 ) (-1024 -3072 512 ) (-2048 -3072 512 ) (-2048 -3072 -128 ) +4 143 144 (-2048 -2048 512 ) (-2048 -2048 -128 ) (-2048 -3072 -128 ) (-2048 -3072 512 ) +4 144 150 (-2048 -3072 -128 ) (-2048 -3072 512 ) (-3072 -3072 512 ) (-3072 -3072 -128 ) +4 144 147 (-3072 -3072 -128 ) (-3072 -3072 512 ) (-3072 -2048 512 ) (-3072 -2048 -128 ) +4 145 146 (-3072 -1024 -128 ) (-3072 -1024 512 ) (-4096 -1024 512 ) (-4096 -1024 -128 ) +4 146 147 (-3072 -2048 -128 ) (-3072 -2048 512 ) (-4096 -2048 512 ) (-4096 -2048 -128 ) +4 147 151 (-3072 -3072 -128 ) (-3072 -3072 512 ) (-4096 -3072 512 ) (-4096 -3072 -128 ) +4 148 149 (-1024 -3072 512 ) (-1024 -3072 -128 ) (-1024 -4096 -128 ) (-1024 -4096 512 ) +4 149 150 (-2048 -4096 -128 ) (-2048 -4096 512 ) (-2048 -3072 512 ) (-2048 -3072 -128 ) +4 150 151 (-3072 -3072 512 ) (-3072 -3072 -128 ) (-3072 -4096 -128 ) (-3072 -4096 512 ) diff --git a/MCDV/sample_stuff/de_tavr_test.vmx b/MCDV/sample_stuff/de_tavr_test.vmx index f11bc7d..33dbf00 100644 --- a/MCDV/sample_stuff/de_tavr_test.vmx +++ b/MCDV/sample_stuff/de_tavr_test.vmx @@ -2,7 +2,7 @@ versioninfo { "editorversion" "400" "editorbuild" "8075" - "mapversion" "30" + "mapversion" "32" "formatversion" "100" "prefab" "0" } @@ -32,7 +32,7 @@ viewsettings world { "id" "1" - "mapversion" "30" + "mapversion" "32" "classname" "worldspawn" "detailmaterial" "detail/detailsprites" "detailvbsp" "detail.vbsp" @@ -1752,6 +1752,141 @@ world } } entity +{ + "id" "367" + "classname" "info_player_terrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-1166.53 2417.49 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 0]" + } +} +entity +{ + "id" "369" + "classname" "info_player_terrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-1033.93 2268.37 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 500]" + } +} +entity +{ + "id" "371" + "classname" "info_player_terrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-1187.76 2316.88 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 1000]" + } +} +entity +{ + "id" "373" + "classname" "info_player_terrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-1236.52 2234.5 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 1500]" + } +} +entity +{ + "id" "375" + "classname" "info_player_counterterrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "21.388 -108.427 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 2000]" + } +} +entity +{ + "id" "377" + "classname" "info_player_counterterrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-44.9061 -116.145 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 2500]" + } +} +entity +{ + "id" "379" + "classname" "info_player_counterterrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-67.0379 -151.444 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 3000]" + } +} +entity +{ + "id" "381" + "classname" "info_player_counterterrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-46.6108 -204.195 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 3500]" + } +} +entity +{ + "id" "383" + "classname" "info_player_counterterrorist" + "angles" "0 0 0" + "enabled" "1" + "origin" "-3.64648 -219.592 17" + editor + { + "color" "220 30 220" + "visgroupshown" "1" + "visgroupautoshown" "1" + "logicalpos" "[0 4000]" + } +} +entity { "id" "195" "classname" "func_buyzone" diff --git a/MCDV/sample_stuff/map_01.vmx b/MCDV/sample_stuff/map_01.vmx index cea5850..99464c8 100644 --- a/MCDV/sample_stuff/map_01.vmx +++ b/MCDV/sample_stuff/map_01.vmx @@ -228332,7 +228332,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228411,7 +228411,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228490,7 +228490,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228569,7 +228569,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228648,7 +228648,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228727,7 +228727,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228806,7 +228806,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228885,7 +228885,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -228964,7 +228964,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229043,7 +229043,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229122,7 +229122,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229201,7 +229201,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229280,7 +229280,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229359,7 +229359,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229438,7 +229438,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229517,7 +229517,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229596,7 +229596,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229675,7 +229675,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229754,7 +229754,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229833,7 +229833,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229912,7 +229912,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -229996,7 +229996,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230064,7 +230064,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230143,7 +230143,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230222,7 +230222,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230301,7 +230301,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230380,7 +230380,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230448,7 +230448,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230516,7 +230516,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230584,7 +230584,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230652,7 +230652,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230720,7 +230720,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230788,7 +230788,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230867,7 +230867,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -230946,7 +230946,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231025,7 +231025,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231104,7 +231104,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231183,7 +231183,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231262,7 +231262,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231341,7 +231341,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231420,7 +231420,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231488,7 +231488,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231567,7 +231567,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231635,7 +231635,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231703,7 +231703,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231771,7 +231771,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231850,7 +231850,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231918,7 +231918,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -231986,7 +231986,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -232065,7 +232065,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -232133,7 +232133,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -232212,7 +232212,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -232280,7 +232280,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -232359,7 +232359,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -232438,7 +232438,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } @@ -232506,7 +232506,7 @@ hidden { "color" "0 180 0" "visgroupshown" "1" - "visgroupautoshown" "0" + "visgroupautoshown" "1" } } } diff --git a/MCDV/shaders/ss_comp_main.fs b/MCDV/shaders/ss_comp_main.fs new file mode 100644 index 0000000..75b5348 --- /dev/null +++ b/MCDV/shaders/ss_comp_main.fs @@ -0,0 +1,99 @@ +#version 330 core +// Note:: All channels marked with an ** are currently not filled out by the engine. + +// OPENGL +// ____________________________________________________________________________________________ +in vec2 TexCoords; +out vec4 FragColor; + +// UNIFORMS +// Vector Information _________________________________________________________________________ +// ( A bunch of vectors that give you the location of different entities ) +uniform vec3 bounds_NWU; // North-West-Upper coordinate of the playspace (worldspace) +uniform vec3 bounds_SEL; // South-East-Lower coordinate of the playspace (worldspace) +uniform vec2 bounds_NWU_SS; // North-West coordinate of the playspace (screen space) +uniform vec2 bounds_SEL_SS; // South-East coordinate of the playspace (screen space) + +uniform vec2 pos_spawn_ct; // Location of the CT Spawn (0-1) +uniform vec2 pos_spawn_t; // Location of the T Spawn (0-1) +uniform vec2 bombsite_a; // Location of bomsite A (0-1) +uniform vec2 bombsite_b; // Location of bombsite B (0-1) + +// SAMPLER UNIFORMS +// Image Inputs _______________________________________________________________________________ +// ( Standard generated maps from the engine ) +uniform sampler2D tex_background; // Background texture +uniform sampler2D tex_playspace; // Playspace + // R: Playable space (0 or 1), + // G: Height (0-1 normalized) + // B: AO map (mask 0-1) + // A: Outline (mask 0-1) (need to subtract the playable space from this) + +uniform sampler2D tex_objectives; // Objectives + // R: Buzones (0 or 1) + // G: Bombsites (0 or 1) + // **B: Glow map (mask 0-1) + // **A: Outline (mask 0-1) + +uniform sampler2D tex_props; // Props + // **R: Props (0 or 1) + // **G: Height (0-1 normalized) + // **B: Glow map (mask 0-1) + // **A: Outline (mask 0-1) + +uniform sampler2D tex_gradient; // Gradient input + // **RGBA: 256x1 image defining a gradient + +uniform sampler2D texture0; // Custom Image input 3 (**RGBA) +uniform sampler2D texture1; // Custom Image input 4 (**RGBA) +uniform sampler2D texture2; // Custom Image input 5 (**RGBA) + +// SHADER HELPERS +// ____________________________________________________________________________________________ +// ( A collection of simple blend modes ) + +vec3 lerp(vec3 a, vec3 b, float w) +{ + return a + w*(b-a); +} + +vec4 blend_normal(vec4 a, vec4 b, float s) +{ + return vec4(lerp(a.rgb, b.rgb, b.a * s), b.a + (a.a * s)); +} + +vec4 blend_add(vec4 a, vec4 b, float s) +{ + return vec4(a.rgb + (b.rgb * s), a.a); +} + +vec4 sample_gradient(float height) +{ + return vec4(texture(tex_gradient, vec2(height, 0))); +} + +// SHADER PROGRAM +// ____________________________________________________________________________________________ +// ( Write all your shader code & functions here ) +vec4 outline_color = vec4(0.8, 0.8, 0.8, 0.6); +vec4 ao_color = vec4(0.0, 0.0, 0.0, 1.0); + +vec4 buyzone_color = vec4(0.180, 0.828, 0.225, 0.667); +vec4 objective_color = vec4(0.770, 0.295, 0.171, 1.000); + +void main() +{ + vec4 sBackground = vec4(texture(tex_background, TexCoords)); + vec4 sPlayspace = vec4(texture(tex_playspace, TexCoords)); + vec4 sObjectives = vec4(texture(tex_objectives, TexCoords)); + + vec4 final = sBackground; + final = blend_normal(final, ao_color, sPlayspace.b); // Drop shadow + final = blend_normal(final, sample_gradient(sPlayspace.g), sPlayspace.r); // Playspace + final = blend_normal(final, outline_color, sPlayspace.a - sPlayspace.r); // Outline + + final = blend_normal(final, objective_color, sObjectives.r * sObjectives.a); // Objectives + final = blend_normal(final, buyzone_color, sObjectives.g * sObjectives.a); // Buyzones + // Return the final output color + FragColor = final; +} \ No newline at end of file diff --git a/MCDV/shaders/ss_test.fs b/MCDV/shaders/ss_test.fs deleted file mode 100644 index 75b5348..0000000 --- a/MCDV/shaders/ss_test.fs +++ /dev/null @@ -1,99 +0,0 @@ -#version 330 core -// Note:: All channels marked with an ** are currently not filled out by the engine. - -// OPENGL -// ____________________________________________________________________________________________ -in vec2 TexCoords; -out vec4 FragColor; - -// UNIFORMS -// Vector Information _________________________________________________________________________ -// ( A bunch of vectors that give you the location of different entities ) -uniform vec3 bounds_NWU; // North-West-Upper coordinate of the playspace (worldspace) -uniform vec3 bounds_SEL; // South-East-Lower coordinate of the playspace (worldspace) -uniform vec2 bounds_NWU_SS; // North-West coordinate of the playspace (screen space) -uniform vec2 bounds_SEL_SS; // South-East coordinate of the playspace (screen space) - -uniform vec2 pos_spawn_ct; // Location of the CT Spawn (0-1) -uniform vec2 pos_spawn_t; // Location of the T Spawn (0-1) -uniform vec2 bombsite_a; // Location of bomsite A (0-1) -uniform vec2 bombsite_b; // Location of bombsite B (0-1) - -// SAMPLER UNIFORMS -// Image Inputs _______________________________________________________________________________ -// ( Standard generated maps from the engine ) -uniform sampler2D tex_background; // Background texture -uniform sampler2D tex_playspace; // Playspace - // R: Playable space (0 or 1), - // G: Height (0-1 normalized) - // B: AO map (mask 0-1) - // A: Outline (mask 0-1) (need to subtract the playable space from this) - -uniform sampler2D tex_objectives; // Objectives - // R: Buzones (0 or 1) - // G: Bombsites (0 or 1) - // **B: Glow map (mask 0-1) - // **A: Outline (mask 0-1) - -uniform sampler2D tex_props; // Props - // **R: Props (0 or 1) - // **G: Height (0-1 normalized) - // **B: Glow map (mask 0-1) - // **A: Outline (mask 0-1) - -uniform sampler2D tex_gradient; // Gradient input - // **RGBA: 256x1 image defining a gradient - -uniform sampler2D texture0; // Custom Image input 3 (**RGBA) -uniform sampler2D texture1; // Custom Image input 4 (**RGBA) -uniform sampler2D texture2; // Custom Image input 5 (**RGBA) - -// SHADER HELPERS -// ____________________________________________________________________________________________ -// ( A collection of simple blend modes ) - -vec3 lerp(vec3 a, vec3 b, float w) -{ - return a + w*(b-a); -} - -vec4 blend_normal(vec4 a, vec4 b, float s) -{ - return vec4(lerp(a.rgb, b.rgb, b.a * s), b.a + (a.a * s)); -} - -vec4 blend_add(vec4 a, vec4 b, float s) -{ - return vec4(a.rgb + (b.rgb * s), a.a); -} - -vec4 sample_gradient(float height) -{ - return vec4(texture(tex_gradient, vec2(height, 0))); -} - -// SHADER PROGRAM -// ____________________________________________________________________________________________ -// ( Write all your shader code & functions here ) -vec4 outline_color = vec4(0.8, 0.8, 0.8, 0.6); -vec4 ao_color = vec4(0.0, 0.0, 0.0, 1.0); - -vec4 buyzone_color = vec4(0.180, 0.828, 0.225, 0.667); -vec4 objective_color = vec4(0.770, 0.295, 0.171, 1.000); - -void main() -{ - vec4 sBackground = vec4(texture(tex_background, TexCoords)); - vec4 sPlayspace = vec4(texture(tex_playspace, TexCoords)); - vec4 sObjectives = vec4(texture(tex_objectives, TexCoords)); - - vec4 final = sBackground; - final = blend_normal(final, ao_color, sPlayspace.b); // Drop shadow - final = blend_normal(final, sample_gradient(sPlayspace.g), sPlayspace.r); // Playspace - final = blend_normal(final, outline_color, sPlayspace.a - sPlayspace.r); // Outline - - final = blend_normal(final, objective_color, sObjectives.r * sObjectives.a); // Objectives - final = blend_normal(final, buyzone_color, sObjectives.g * sObjectives.a); // Buyzones - // Return the final output color - FragColor = final; -} \ No newline at end of file diff --git a/MCDV/util.h b/MCDV/util.h index 419699f..3ab7b51 100644 --- a/MCDV/util.h +++ b/MCDV/util.h @@ -73,6 +73,15 @@ std::vector split(std::string s, std::string delimiter) namespace sutil { + std::string ReplaceAll(std::string str, const std::string& from, const std::string& to) { + size_t start_pos = 0; + while ((start_pos = str.find(from, start_pos)) != std::string::npos) { + str.replace(start_pos, from.length(), to); + start_pos += to.length(); // Handles case where 'to' is a substring of 'from' + } + return str; + } + std::string trimspace(std::string const& str) { if (str.empty()) diff --git a/MCDV/whammy.dds b/MCDV/whammy.dds new file mode 100644 index 0000000..9b17ddb Binary files /dev/null and b/MCDV/whammy.dds differ diff --git a/deploy_release.bat b/deploy_release.bat new file mode 100644 index 0000000..07b5bc6 --- /dev/null +++ b/deploy_release.bat @@ -0,0 +1,2 @@ +ECHO D | xcopy /y "MCDV/shaders" "Release/shaders" /E /D +ECHO D | xcopy /y "MCDV/textures" "Release/textures" /E /D \ No newline at end of file