Commit Graph

2199 Commits

Author SHA1 Message Date
Luke Street 9cf95b5c10 Editor: Move cvars to CVarCommons 2020-04-14 15:20:51 -04:00
Luke Street 89a1cedba1 Move Editor cvars to CVarCommons 2020-04-14 15:20:00 -04:00
Luke Street 94be460a1b MP1: Convert MP1_VARIABLE_DELTA_TIME to cvar 2020-04-14 14:41:02 -04:00
Luke Street aba42eba52 Add variableDt cvar 2020-04-14 14:40:03 -04:00
Lioncash 786675f307 CTextExecuteBuffer: Move initialization of xa8_curWordIt into initializer list 2020-04-13 16:18:38 -04:00
Luke Street 654e3e705e Update hecl; disable MP1_VARIABLE_DELTA_TIME 2020-04-13 15:02:07 -04:00
Luke Street 776e9394ac Don't limit CpuCountOverride to nproc 2020-04-13 01:10:03 -04:00
Jack Andersen 5b4441ac36 Update fmtlib 2020-04-11 12:51:39 -10:00
Jack Andersen 6a8714c1f3 Update fmtlib 2020-04-11 12:48:11 -10:00
Jack Andersen 26f272735d Set compiler flags for building with C++20 2020-04-10 19:05:55 -10:00
Jack Andersen 7ce829d134 Fix PyOutStream streambuf for MS STL 2020-04-10 18:58:06 -10:00
Jack Andersen 380cc13abb Fixes for MP3 2020-04-09 17:20:20 -10:00
Jack Andersen 8fd6664984 Additional addon features for MP3 2020-04-09 17:19:33 -10:00
Jack Andersen 2c98306dff add update_height parameter to Nodegrid.place_node 2020-04-09 13:40:19 -10:00
Jack Andersen a668a623cb Exclude bitmap3 from MP3's PATH 2020-04-08 20:03:52 -10:00
Jack Andersen 81c5750c44 Update athena 2020-04-08 20:03:17 -10:00
Jack Andersen df229671c4 MP2 PATH support 2020-04-08 19:19:50 -10:00
Jack Andersen 5720ba9873 Update athena 2020-04-08 19:19:42 -10:00
Jack Andersen 5b0a4b5f60 Implement MP2 shader extraction presets 2020-04-08 16:24:18 -10:00
Jack Andersen 9bb45dae80 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/hecl 2020-04-08 16:23:48 -10:00
Jack Andersen c98442de9a Emit material chunk if socket value differs from default 2020-04-08 16:23:12 -10:00
Lioncash 57fa706311 hecl: Allow Time instances to be constexpr
Some constructors accept primitive values. These can be made constexpr.
2020-04-05 09:35:31 -04:00
Lioncash b5a26d5136 VertexBufferPool: Make Token move constructor and move assignment noexcept
Same behavior, but allows the type to be used nicely with containers and
move facilities that rely on std::move_if_noexcept.
2020-04-05 09:28:05 -04:00
Lioncash caca49b3bd UniformBufferPool: Make Token move constructor and move assignment noexcept
Allows the type to be used with containers and facilities that make use
of std::move_if_noexcept, etc.
2020-04-05 09:26:29 -04:00
Lioncash 1a031f54c4 ProjectPath: Remove unused file-scope std::regex instance
Same behavior, minus an unnecessary heap allocation on program start.
2020-04-05 09:22:28 -04:00
Lioncash c48303c2c2 Database: Add missing const qualifier 2020-04-05 09:21:58 -04:00
Lioncash 393e824838 Project: Make checkForLine() a const member function
This only ever queries the existence of a line, so it can be made const.
2020-04-05 09:16:33 -04:00
Lioncash 613b503cd6 FourCC: Remove constexpr from IStreamReader constructor
IStreamReader isn't constexpr, so this will result in a compilation
error if used.
2020-04-05 09:13:29 -04:00
Lioncash ede801b344 Project: Use emplace_back where applicable in lockAndRead()
Same behavior, but allows for in-place construction.
2020-04-05 09:12:27 -04:00
Lioncash 45556184b4 HMDL_RT: Make use of std::make_unique
More straightforward than using raw new within a reset() call.
2020-04-05 09:05:37 -04:00
Lioncash ebb0a161c3 HMDL_RT: Remove unnecessary pointer cast
The MemoryReader class already accepts const qualified data, so there's
no need to cast away const.
2020-04-05 09:03:38 -04:00
Jack Andersen e7f17d56c2 Add IStreamReader overloaded constructor to DNAFourCC 2020-03-28 18:10:55 -10:00
Luke Street b73338e8fa Update hecl (again) 2020-03-04 02:41:15 -05:00
Luke Street 7b63b8e197 bintoc: Use ZLIB_INLCUDE_DIR 2020-03-04 02:41:03 -05:00
Luke Street b08cd66e98 Update hecl 2020-03-04 02:35:57 -05:00
Luke Street e4a775f18e Avoid duplicate athena/extern/zlib import 2020-03-04 02:35:32 -05:00
Phillip Stephens 7803a2f428
Update hecl 2020-03-03 16:53:26 -08:00
Phillip Stephens 3d0451a496 Compile fix 2020-03-03 16:52:57 -08:00
Phillip Stephens 80dbc1920c
Update submodules 2020-03-03 16:49:13 -08:00
Phillip Stephens 2149af68fa Merge pull request #35 from AxioDL/bintoc-compress
Add bintoc --compress
2020-03-03 16:47:09 -08:00
Phillip Stephens 7abe527032 Merge pull request #34 from linkmauve/xdg-basedir
Respect the XDG base directory specification
2020-03-03 16:45:08 -08:00
Phillip Stephens 4f045dd0fa Merge pull request #33 from lioncash/transparent
hecl/hecl: Allow CaseInsensitiveCompare to be used with heterogenous lookup
2020-03-03 16:44:55 -08:00
Luke Street 8d8f92c898 Add bintoc --compress 2020-03-02 02:00:49 -05:00
Emmanuel Gil Peyrot 32578f7520 Respect the XDG base directory specification
This helps unclutter the home directory from useless dotfiles, moving
them where they belong.

See https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html
2020-02-25 12:29:15 +01:00
Luke Street 051a547c42 Update hecl/extern/boo (MSAN fix) 2020-02-25 02:33:49 -05:00
Luke Street 7afe13b713 Update boo (MSAN fix) 2020-02-25 02:32:58 -05:00
Lioncash eebb25a39c hecl/hecl: Allow CaseInsensitiveCompare to be used with heterogenous lookup
It's quite common to see maps or sets that make use of a string->object
association, usually as <std::string, T>. However, this can result in
inefficient code when performing lookups or indexing, as something like:

std::map<std::string, T> some_map;

...

auto iter = some_map.find("Name");

...

will result in a std::string instance being constructed around "Name",
which is less than ideal.

With a heterogenous comparator, however (such as std::less<>), like:

std::map<std::string, T, std::less<>>

we allow the container to do automatic type deduction and comparisons.
This allows types comparable to the key type to be used in find calls,
etc, without actually needing to construct the key type around the other
type.

The main way to enable containers to perform such behavior is by
defining a type named is_transparent within the comparator type.
2020-02-24 04:31:55 -05:00
Luke Street 4e51c24635 Update hecl/extern/boo 2020-02-21 13:51:19 -05:00
Luke Street 05cd085264 Update boo 2020-02-21 13:51:03 -05:00
Luke Street 5de8275a77 Update hecl/hecl-gui to check Blender 2.81+ 2019-12-22 18:41:42 -05:00
Luke Street 3294047a06 Require Blender 2.81+ 2019-12-22 18:39:24 -05:00
Phillip Stephens 21159e604e
More CThardus 2019-12-14 15:50:29 -08:00
Phillip Stephens 4e5921c952
Update submodules 2019-12-10 20:51:23 -08:00
Phillip Stephens 46c3778bc0 Update athena 2019-12-10 20:50:31 -08:00
Phillip Stephens def854cc61
Update hecl 2019-10-24 22:50:13 -07:00
Phillip Stephens 02d4292179 Add missing brace (where the heck did it go?) 2019-10-24 22:49:41 -07:00
Phillip Stephens 246e233dce
Cleanup CPathFindArea 2019-10-24 22:44:37 -07:00
Phillip Stephens a9dee6e268 Minor string fix 2019-10-24 22:43:45 -07:00
Phillip Stephens bc15ab2157 Merge pull request #32 from lioncash/console
Console: Minor changes
2019-10-24 22:41:08 -07:00
Lioncash a0e6ec0de7 Console: Make State enum an enum class
Makes the enum strongly typed and impervious to implicit conversions.
2019-10-21 01:53:05 -04:00
Lioncash 12d6a5ce05 Console: Make isOpen() a const member function
This member function doesn't modify internal member state, so it can be
turned into a const qualified member function.
2019-10-21 01:49:23 -04:00
Lioncash 78aa42032a Console: Make truncation explicit within proc()
Makes floating-point truncation explicit.
2019-10-21 01:40:34 -04:00
Lioncash 358acfe944 Console: Use std::move within vreport()
Avoids redundant copies when emplacing into the log container.
2019-10-21 01:37:07 -04:00
Lioncash c8eab43489 Console: Make commandExists() a const qualified member function
This doesn't modify internal console state, so it can be turned into a
const qualified member function.
2019-10-21 01:30:19 -04:00
Lioncash deb09550d3 Console: Eliminate redundant strlen call in commandExists()
By using the std::string_view constructor for std::string, we can avoid
the char* constructor, which would require a strlen call in order to
determine the string size. This also allows it to work with
non-null-terminated strings.
2019-10-21 01:28:22 -04:00
Lioncash 96721d96ae Console: Avoid unnecessary copies and lookups within executeCommand()
We can make use of the result of a find() call to avoid performing two
redundant lookups into the command map and also use std::move to avoid
performing potentially reallocating copies.
2019-10-21 01:26:21 -04:00
Lioncash 7fbdf384de Console: Reuse iterator in unregisterCommand()
We can use the result of the first lookup to avoid doing another
redundant lookup to perform the erasure.

While we're at it, we can use std::string's std::string_view constructor
in order to avoid an unnecessary strlen() call.
2019-10-21 01:07:41 -04:00
Lioncash 5d2987588b Console: Use emplace in registerCommand()
Allows avoiding a redundant initial element. We can also remove the
const from the std::function rvalue to allow a std::move to take effect.

We can also use the std::string_view constructor for std::string to
avoid an unnecessary strlen() call.
2019-10-21 01:03:30 -04:00
Lioncash cbd40382bf Console: Convert std::bind to lambda functions
Same behavior, but more efficient than wrapping the function.
2019-10-21 00:53:15 -04:00
Lioncash 23f323b0f7 CVar: Use std::string::empty where applicable
We can use empty() instead of comparing against a default constructed
new instance.
2019-10-19 19:24:06 -04:00
Jack Andersen dfcad01c2f Fix TypedVariant building with MSVC 2019-10-18 15:31:54 -10:00
Jack Andersen 3506ee1796 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/hecl 2019-10-12 18:54:33 -10:00
Jack Andersen 72fabc9329 Minor blender exception detection bug fix 2019-10-12 18:54:07 -10:00
Phillip Stephens e1990a686e
Update hecl 2019-10-12 07:13:36 -07:00
Phillip Stephens 8a3b19126a Fix shader generation 2019-10-12 07:12:50 -07:00
Jack Andersen 16ca0d24c2 Explicit Asset ID refactor 2019-09-30 21:38:03 -10:00
Jack Andersen 88e68e8aa3 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/hecl 2019-09-30 21:30:17 -10:00
Jack Andersen 8a73a8ee48 Code style improvements 2019-09-30 21:23:35 -10:00
Lioncash 9138ad691c FourCC: Make rest of interface noexcept where applicable
Makes the interface consistent and allows their use within noexcept
contexts.
2019-09-30 03:13:08 -04:00
Phillip Stephens 6b56f2e6a4 Minor fixes 2019-09-29 08:17:01 -07:00
Phillip Stephens 7fd54effc9 Various fixes and improvements to CVars 2019-09-29 05:44:01 -07:00
Phillip Stephens e80d0319fa Update athena 2019-09-27 20:38:19 -07:00
Phillip Stephens 2a150f2e7f Update athena 2019-09-26 06:54:24 -07:00
Lioncash 72732a1ea7 TypedVariant: Be explicit about athena's Endian type
Allows this code to still compile if the Endian enum is ever changed
into an enum class.
2019-09-20 17:56:15 -04:00
Lioncash 8814ecbc4c TypedVariant: Apply formatting to macros
Applies clang-format to the macros to prevent the changes from being
placed into the following change.
2019-09-20 17:52:28 -04:00
Phillip Stephens 35988aff00 Update athena 2019-09-14 08:46:41 -07:00
Lioncash aaf5bae201 General: Be explicit about athena's Endian type
Allows this code to build if the enumeration is ever changed into a
strongly-typed enumeration.
2019-09-14 10:59:39 -04:00
Lioncash 9901653634 Backend: Make ExtensionSlot's constructor constexpr
These are used within a file-scope lookup table in urde. Without this,
technically those constructors are runtime static constructors.

This allows the compiler to initialize them at compile-time.
2019-09-11 01:52:26 -04:00
Phillip Stephens d13559bf51 Update submdoules 2019-09-10 04:07:31 -07:00
Phillip Stephens b1438a88da Update athena 2019-09-09 04:20:29 -07:00
Phillip Stephens 23dabdaf37 Merge pull request #25 from lioncash/target
ApplicationTools: Link in boo and hecl-light
2019-09-09 04:19:37 -07:00
Phillip Stephens f35e4c27c2 Update submodules 2019-09-08 00:15:48 -07:00
Phillip Stephens 43611bd0b7 Merge pull request #26 from lioncash/enum
General: Be explicit about SeekOrigin type
2019-09-08 00:11:52 -07:00
Lioncash 8bac46508c General: Be explicit about SeekOrigin type
This will make turning SeekOrigin into an enum class a little smoother
without breaking hecl.
2019-09-07 12:33:03 -04:00
Phillip Stephens 7ab3ae5c30 Update athena 2019-09-07 07:07:42 -07:00
Phillip Stephens 822227a1ca Temporary xxhash fixes, update submodules 2019-09-06 23:30:53 -07:00
Lioncash c297c6c7a9 ApplicationTools: Link in boo and hecl-light
Ensures that the include paths are always automatically added to the
shader targets.
2019-09-06 02:10:58 -04:00
Phillip Stephens 6c8ffcddad Update athena 2019-09-05 01:10:05 -07:00
Phillip Stephens b263f29da2 Update athena 2019-09-04 19:37:52 -07:00
Lioncash 5e66bee28c General: Include necessary includes
Ensures all necessary includes are included and also removes headers
that aren't necessary
2019-09-04 19:23:55 -04:00
Jack Andersen c7ffe725ae Update submodules 2019-08-31 11:20:54 -10:00
Jack Andersen 0b30fedef5 Update boo 2019-08-31 11:20:43 -10:00
Jack Andersen cffb56a24e MacOS build fixes 2019-08-31 10:40:07 -10:00
Jack Andersen c180cbd529 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/hecl 2019-08-31 10:38:33 -10:00
Jack Andersen a434118f27 Update submodules 2019-08-31 10:38:06 -10:00
Phillip Stephens fbb5b86401 Compile fixes 2019-08-31 01:59:38 -07:00
Lioncash 4f19e8623e Project: Eliminate local variable shadowing
Eliminates trivial variable shadowing warnings.
2019-08-30 11:47:18 -04:00
Phillip Stephens 1269cd74c3 Update athena 2019-08-26 16:00:29 -07:00
Phillip Stephens 41d87cf80e Update boo 2019-08-26 15:58:10 -07:00
Phillip Stephens 5a5194dd4a Update Boo 2019-08-25 18:29:01 -07:00
Lioncash 4ca9a57540 hecl/hecl: Remove windows ifdef in CaseInsensitiveCompare
This is technically still usable for non-Windows systems, given there's
nothing directly Windows-specific about the operator overload
2019-08-25 21:22:44 -04:00
Phillip Stephens 3daaeac76b Update boo 2019-08-24 17:58:26 -07:00
Phillip Stephens 34505ea557 Update boo 2019-08-24 14:45:57 -07:00
Phillip Stephens 9725c12c52 Merge pull request #21 from lioncash/move
CVar: std::move listeners within addListener()
2019-08-24 14:43:47 -07:00
Lioncash 3dc10e7473 CVar: std::move listeners within addListener()
std::function is allowed to heap allocate in order to hold any necessary
captures, so we should be std::move-ing instances here in order to avoid
potentially performing reallocations.
2019-08-24 16:27:29 -04:00
Lioncash 6968f8a301 hecl/hecl: Use nullptr where applicable 2019-08-24 16:14:59 -04:00
Lioncash e5a0d657b3 hecl/hecl: Remove pointer casts from GetTmpDir()
We can just make the pointers point to const data, eliminating the need
to cast away const.
2019-08-24 16:04:30 -04:00
Lioncash 40b2e3edde hecl/hecl: Dehardcode sizes where applicable
Queries the source arrays for the size instead of replicating it
elsewhere.
2019-08-24 16:00:49 -04:00
Lioncash 0a6edbad2c hecl/hecl: Tidy up GetSystemLocations()
Converts a define into a constexpr variable, also joins declarations
with assignments where applicable.
2019-08-24 16:00:44 -04:00
Lioncash bc7a6563cf hecl/hecl: Simplify SetThreadRes() 2019-08-24 15:36:35 -04:00
Lioncash 32fec587b5 hecl/hecl: Collapse InProgress() into std::any_of()
Same thing, more straightforward.
2019-08-24 15:32:18 -04:00
Lioncash e96eb4cac6 hecl/hecl: Include relevant headers
Ensures the translation unit includes exactly what it needs.
2019-08-24 15:28:54 -04:00
Lioncash 5e98cb139a hecl/hecl: Convert std::string/std::wstring to views
Gets rid of two static constructors.
2019-08-24 15:23:57 -04:00
Phillip Stephens d39caf54bb Update athena 2019-08-24 00:49:15 -07:00
Phillip Stephens 52f9922820 Merge pull request #18 from lioncash/noexcept
hecl/hecl: noexcept correctness changes
2019-08-24 00:47:45 -07:00
Lioncash 7088235bc4 hecl: Correct fmt formatting specifiers
These should be using {}-style formatting specifiers instead of printf
style. While we're at it, std::move the std::string instances where
applicable to potentially avoid reallocations.
2019-08-24 03:21:16 -04:00
Lioncash a7bd496698 hecl/hecl: Remove pointer casts from Hash constructor interface
The interface accepts const void* as the input type, so there's no need
to explicitly pointer cast the input data.
2019-08-24 02:55:09 -04:00
Lioncash e127fed0fd hecl/hecl: Mark Hash interface as noexcept
These are utilized within some hash implementations, which shouldn't
throw, so these member functions can be marked as noexcept.
2019-08-24 02:52:27 -04:00
Lioncash 09fe937bc3 hecl/hecl: Make hash_combine_impl noexcept
This is used to implement hashes, and since hash implementations
shouldn't throw, these shouldn't as well.
2019-08-24 02:46:47 -04:00
Lioncash f957dd594b hecl/hecl: Mark byte swapping functions as noexcept
These are frequently used within hash implementations, which should be
noexcept by default. Given it doesn't make sense to throw exceptions
from these functions anyways, they can be made noexcept.
2019-08-24 02:46:44 -04:00
Phillip Stephens e12e0057c3 Minor compile fixes 2019-08-23 16:58:15 -07:00
Phillip Stephens ff7e95546b Merge pull request #16 from lioncash/string
hecl/Compilers: Amend minor string related code
2019-08-23 16:36:53 -07:00
Lioncash 2d7dd9bf5b Connection: Collapse emplace_back(), back() pairs
emplace_back() already returns a reference to the constructed member, so
we don't need to query it via back() again.
2019-08-23 14:02:18 -04:00
Lioncash cbcfdcb67a Connection: Eliminate variable shadowing
Amends trivial cases of variable shadowing.
2019-08-23 13:56:11 -04:00
Lioncash 11b3bf0889 Connection: Alphabetize friend class/struct declarations 2019-08-23 13:44:33 -04:00
Lioncash 6492117d60 Connection: Remove <iostream> include
Avoids injecting a static constructor into translation units including
this source file, even if nothing in the source file uses the iostream
facilities.

Instead, we can replace this with an ostream include. While we're at it,
we can make sure we include everything necessary within the source file.
2019-08-23 13:44:30 -04:00
Lioncash 877ca7ad87 Connection: Make use of std::array where applicable
Uses std::array in place of C arrays where not used as a buffer.
2019-08-23 12:44:55 -04:00
Lioncash a3caa28483 Connection: Collapse definition of operator== for Vert
This can be collapsed down to a single tie comparison
2019-08-23 12:32:13 -04:00
Lioncash 8fdd9a15c4 Connection: Collapse VertInBank into std::any_of
Same thing, single line.
2019-08-23 12:26:14 -04:00
Lioncash 5d30a9d7ea Connection: Use nullptr instead of NULL where applicable
Same behavior, stronger typing.
2019-08-23 12:08:08 -04:00
Lioncash 2e16f882d2 hecl/Compilers: Make use of nullptr over NULL
Same behavior, stricter type.
2019-08-23 11:56:37 -04:00
Lioncash d59d453db3 hecl/Compilers: Convert fprintf calls over to fmt::print
Makes the Metal code more consistent with the other compilers. While
we're at it we can also fix accidental printf leftovers within the
existing fmt format strings.
2019-08-23 11:53:39 -04:00
Lioncash 73cf8df409 hecl/Compilers: Convert printf call over to fmt::print
Same behavior, but properly handles the case where the given string_view
may not be null terminated.
2019-08-23 11:49:55 -04:00
Lioncash 3b60cee576 hecl/Compilers: Make name strings constexpr
Same behavior (as of C++17), without the need to duplicate the variable
name.
2019-08-23 11:42:12 -04:00
Phillip Stephens e691b95cbf Merge pull request #15 from lioncash/file
hecl/hecl: Introduce FopenUnique
2019-08-21 23:16:25 -07:00
Lioncash fb9e4df372 hecl: Make use of FopenUnique
Makes use of the introduced API function to eliminate the need to
explicit fclose FILE* instances.
2019-08-22 01:16:48 -04:00
Lioncash 7bb3912d39 General: Make operator bool() explicit where applicable
Makes conversions to bool slightly less error-prone by requiring them to
be explicit in non-obvious contexts.
2019-08-22 01:15:38 -04:00
Phillip Stephens 120ed20bfa Merge pull request #14 from lioncash/string
Connection: Replace std::string _writeStr overload with std::string_view
2019-08-21 20:23:56 -07:00
Phillip Stephens 3ef555dba4 Merge pull request #11 from lioncash/lock
General: Make use of lock deduction guides
2019-08-21 20:23:43 -07:00
Lioncash 9dcf7e7f08 hecl/hecl: Add smart pointer variant of Fopen
Provides a wrapper API over Fopen in order to prevent resource leaks.
2019-08-21 19:28:14 -04:00
Lioncash d00cb36fc2 Connection: Amend clang-format discrepancies 2019-08-21 19:16:46 -04:00
Lioncash ac4858b857 Connection: Replace usages of goto 2019-08-21 19:16:02 -04:00
Lioncash 6c9fdfcbb7 Connection: Replace std::string _writeStr override with std::string_view
Same thing, but usable without the need to construct a std::string
instance for things like string literals.
2019-08-21 18:30:07 -04:00
Lioncash 5d157e97b3 General: Use override where applicable 2019-08-21 18:20:07 -04:00
Lioncash 82109b785d General: Make use of lock deduction guides
Allows dehardcoding the type within the locks.
2019-08-21 17:01:03 -04:00
Phillip Stephens bcfea9a09a Merge pull request #10 from lioncash/cv
CVar: Remove redundant const return for toLiteral() and toWideLiteral()
2019-08-20 19:31:06 -07:00
Lioncash b9e5417a94 CVar: Remove redundant const return for toLiteral() and toWideLiteral()
This can actually inhibit copy elision
2019-08-20 10:15:14 -04:00
Phillip Stephens f9bda234fa Update submodules 2019-08-20 06:57:52 -07:00
Phillip Stephens 138ab07089 Merge pull request #9 from lioncash/cvar
CVarManager: Minor changes
2019-08-20 06:56:24 -07:00
Phillip Stephens 31e9ee50b9 Merge pull request #8 from lioncash/db
Database: Minor cleanup
2019-08-20 06:56:17 -07:00
Lioncash 645f20c308 CVarManager: Deduplicate repetitive names
We can just assign the repeated portion of the expression to a reference
instead of continually re-accessing the same variable, making it nicer
to read.
2019-08-20 06:29:17 -04:00
Lioncash cfced1bf0a CVarManager: Eliminate redundant map lookups
We can simply utilize the iterator of the previous existence check to
access the member instead of hashing through the map again.
2019-08-20 06:23:25 -04:00
Lioncash 4818198e41 CVarManager: Brace multi-line statements
Makes intentions explicit.
2019-08-20 06:10:23 -04:00
Lioncash a16327df68 CVarManager: Use std::any_of for restartRequired()
Same thing, but more concise.
2019-08-20 06:08:12 -04:00
Lioncash a1a18c6816 CVarManager: Use insert_or_assign where applicable
Avoids the need to create an initial entry in the map which is then
overwritten with the value being assigned to it.
2019-08-20 06:06:55 -04:00
Phillip Stephens 3795e0e72c Update boo 2019-08-20 01:08:25 -07:00
Phillip Stephens 6a78383d2a Update boo 2019-08-20 00:34:25 -07:00
Phillip Stephens 5659c46170 Merge pull request #7 from lioncash/override
driver: Minor general cleanup
2019-08-19 23:02:46 -07:00
Lioncash 9b735a853c Database: Silence -Wdocumentation warnings
Amends two Doxygen parameter references.
2019-08-19 23:22:03 -04:00
Lioncash 7635b9c6c1 Database: Remove unused includes
Quite a few includes aren't directly used anywhere within the header
itself. We can remove these to avoid unintentionally propagating them
into other source files.
2019-08-19 23:14:27 -04:00
Lioncash 263c0697bc Database: Use nullptr instead of NULL where applicable 2019-08-19 23:09:41 -04:00
Lioncash 66125c2b3b Database: Convert typedefs into using aliases 2019-08-19 23:08:35 -04:00
Lioncash 93ec114e0c Database: Use [[maybe_unused]] instead of (void)
Same behavior, but without the need to duplicate the variable name.
2019-08-19 23:06:57 -04:00
Lioncash 19f49e071d driver: Use nullptr instead of NULL where applicable
Same thing, but more typesafe, given all NULL is, is a literal 0.
2019-08-19 22:52:35 -04:00
Lioncash 789650d4c0 driver/ToolBase: Convert typedef into using alias
Same thing, but a little nicer to read.
2019-08-19 22:51:07 -04:00
Lioncash f746b30b03 driver: Make tool constructors explicit
Enforces being explicit when constructing instances of these types.
2019-08-19 22:49:27 -04:00
Lioncash 11364cbd53 driver/ToolBase: Make operator bool() explicit
Prevents error-prone conversions to bool.
2019-08-19 22:35:32 -04:00
Lioncash c390f3d489 driver: Add missing override specifiers where applicable
Adds missing override specifiers to enforce correct virtual member
function signatures.
2019-08-19 22:34:15 -04:00
Lioncash d3ac48715f driver/main: Use separate variables for error checking in main()
Avoids reusing the same variable for two different areas of behavior and
uses separately named variables. This can help debugging if the first
condition isn't true, but the tool run condition is true, as it provides
an error count to compare against.
2019-08-19 21:57:25 -04:00
Lioncash 7647fa3ca6 driver/main: Factor out argument handling to its own function
Factors out the ToolPassInfo construction to its own function keep the
code isolated from everything else. Also simplifies the assignment in
main().

We can also migrate the global cwdbuf into this function to narrow its
scope down.
2019-08-19 21:50:02 -04:00
Lioncash d76d776a0e driver/main: Factor out tool construction code to its own function
Isolates the tool construction code and also makes the assignment within
main more straightforward. While we're at it, we can also make use of
std::make_unique within the relocated function.
2019-08-19 21:38:23 -04:00
Lioncash fd61ba6cc7 driver/main: Factor out project finding code to its own function
Keeps the logic contained within its own function and makes the
assignment more straightforward within main().
2019-08-19 21:18:05 -04:00
Phillip Stephens 1fb18dbf26 Update boo 2019-08-18 18:49:27 -07:00
Phillip Stephens 269ca8a7ec Update boo 2019-08-17 22:59:38 -07:00
Phillip Stephens e4d66745f5 Update submodules 2019-08-16 18:38:25 -07:00
Phillip Stephens c411f6e784 Update athena 2019-08-15 16:08:31 -07:00
Phillip Stephens 5ae5edfc46 Update athena 2019-08-15 08:41:04 -07:00
Phillip Stephens fb529992ca Update athena 2019-08-15 07:52:37 -07:00
Phillip Stephens 401ef19682 Merge pull request #5 from lioncash/fcc
hecl/FourCC: Remove undefined behavior and make rest of interface constexpr where applicable
2019-08-15 07:47:29 -07:00
Phillip Stephens 23551de349 Merge pull request #3 from lioncash/str
hecl/hecl: Minor changes and improvements to string utilities
2019-08-15 07:47:17 -07:00
Lioncash 477645f15d hecl/FourCC: Amend clang-format discrepancies
These were formatting discrepancies that existed before all of the
previous changes. We may as well resolve them so that others don't run
into them.
2019-08-15 06:49:20 -04:00
Lioncash 64ac2e423e hecl/FourCC: Make use of constexpr constructors where applicable 2019-08-15 06:48:38 -04:00
Lioncash 9e7661eb7a hecl/FourCC: Make rest of FourCC interface constexpr where applicable
Finally, we can make the rest of the interface constexpr, except for
toString().
2019-08-15 06:48:38 -04:00
Lioncash 2f9010bc9f hecl/FourCC: Eliminate magic values in DNAFourCC 2019-08-15 06:48:38 -04:00
Lioncash 1382bbf365 hecl/FourCC: Implement operator!= in terms of operator==
Deduplicates the amount of written code. Now code only needs to ever
change in operator== to automatically reflect across the two functions.
2019-08-15 06:48:38 -04:00
Lioncash 06c436b68d hecl/FourCC: Eliminate undefined behavior within FourCC interface
Type punning like this isn't actually well-defined behavior. Only
casting to char/unsigned char is well defined. This presents a problem
when using FourCC instances in constexpr contexts, given constexpr
contexts are forbidden from having undefined behavior in them.

Because of that, any attempt to use the const char* constructor within a
constexpr context would always result in a compilation error.
2019-08-15 06:48:31 -04:00
Lioncash 0f74cce2ca hecl/FourCC: Tidy up constructors
Marks constructors as noexcept and explicitly defaults the copy
constructor/assignment and move constructor/assignment.
2019-08-15 05:28:11 -04:00
Lioncash 9ec19d99cd hecl/hecl: Make hash constructors explicit where applicable 2019-08-15 03:06:56 -04:00
Lioncash 06548409f8 hecl/hecl: Make Hash constexpr 2019-08-15 03:00:42 -04:00
Lioncash 216b038a7d hecl/SystemChar: Unify StrLen implementations and make constexpr
We can utilize std::char_traits to generically handle the defined
character type. Since C++17, std::char_traits' length() function is
constexpr, so we can also make StrLen constexpr.
2019-08-15 02:28:31 -04:00
Lioncash 58e0c7eaa7 hecl/SystemChar: Cast to unsigned char before calling tolower/toupper
Performed for the same reasons outlined within
b32f16b519eafacb9de4852855486270f73d5e2e (avoiding undefined behavior).
2019-08-15 02:28:31 -04:00
Lioncash b63d848846 hecl/hecl: Amend lingering formatting inconsistencies
Amends formatting issues that were pre-existing to get them out of the
way.
2019-08-15 02:28:09 -04:00
Lioncash 485782e3a7 hecl/hecl: Convert typedefs to using aliases
Same thing, but slightly nicer to read.
2019-08-15 02:26:12 -04:00
Lioncash eb872cdf88 hecl/hecl: Assign ResourceLock's good member in the initializer list
Same behavior, but more idiomatic. While we're at it, we can make said
constructor and the conversion operator explicit to make the class a
little less error-prone.
2019-08-15 02:26:12 -04:00
Lioncash 92b87676c2 hecl/hecl: Make Entry take SystemString by value and move it
This allows callers to move into the constructor and subsequently move
into the member variable, avoiding copies altogether.
2019-08-15 02:26:12 -04:00
Lioncash dae3e6123f hecl/hecl: Make string conv operator+ instances friend functions
Makes both operators symmetrical to one another.
2019-08-15 02:26:12 -04:00
Lioncash c7aae83a75 hecl/hecl: Slightly improve resource usage within string conv operator+ funcs
We already construct a std::string instance, so we can just append to
it instead of creating another temporary with std::string's operator+.
We also change this to append using the string view getter functions, as
this allows the appending process to do less work. When a pointer is
passed in, a strlen call would need to be performed in order to
determine the total characters to append. However, we already know the
size (via the string view).
2019-08-15 02:26:12 -04:00
Lioncash c513a4b61f hecl/hecl: Make use of std::char_traits with StrNCmp
Same behavior, but allows removing the use of ifdefs, unifying the code
paths.
2019-08-15 02:26:12 -04:00
Lioncash ef6b41ea15 hecl/hecl: Amend string functions operating on string views to use interface functions
We don't really need to call out to the C functions to perform the
comparison behavior when the views already have a comparison function
as part of their interface.
2019-08-15 02:26:03 -04:00
Lioncash e0b5a4e2f7 hecl/hecl: Cast to unsigned char before calling std::isspace
std::string_view instances can contain character values that lie outside
the range of an unsigned char (negative values). If such a value is
passed into std::isspace, then the behavior of the function is
undefined. To avoid this, we add these casts.
2019-08-15 01:21:10 -04:00
Lioncash 91ff474c44 hecl/hecl: Handle bounded strings within CaseInsensitiveCompare
std::string_view instances aren't guaranteed to be null-terminated, so
we shouldn't be treating them as if they are in these functions, and
should instead use a bounded comparison based off their sizes.

This way we prevent an edge-case from ever becoming a problem and also
remove an ifdef, making the code uniform across all implementations.
2019-08-15 01:21:04 -04:00
Phillip Stephens 9dc1373201 Update boo 2019-08-14 06:52:24 -07:00
Phillip Stephens 78e88679a9 Update boo 2019-08-13 14:40:21 -07:00
Phillip Stephens a7c97b313c Update athena 2019-08-10 17:47:40 -07:00
Jack Andersen 0ab08daae7 Windows build fixes 2019-07-27 15:21:31 -10:00
Jack Andersen 7b05b41d34 Windows build fixes 2019-07-27 15:19:48 -10:00
Jack Andersen 5acf9ecbcf Graphics debug groups and bug fixes 2019-07-20 22:42:52 -10:00
Jack Andersen 08d15514a9 Update submodules 2019-07-20 22:42:03 -10:00
Jack Andersen 7a3da1f7a6 Massive fmtlib refactor 2019-07-19 18:27:21 -10:00
Jack Andersen 6988f86672 Massive fmtlib refactor 2019-07-19 18:22:58 -10:00
Jack Andersen e38a3ece89 More CBabygoth fixes 2019-07-06 22:22:35 -10:00
Jack Andersen b483acb8d3 Update submodules 2019-07-06 22:21:39 -10:00
Phillip Stephens 97ae6fbe98 Fix codesign failure 2019-07-01 02:22:17 -07:00
Phillip Stephens efa7463a9a shaderc metal "error" fix 2019-07-01 01:26:42 -07:00
Phillip Stephens c30703209f Fix macOS builds finally 2019-06-30 21:04:24 -07:00
Phillip Stephens cfd365bebe Update boo 2019-06-30 21:03:54 -07:00
Phillip Stephens 46c570f8a6 Update submodules 2019-06-30 20:41:06 -07:00
Phillip Stephens b251de5fd0 Update boo 2019-06-30 20:40:26 -07:00
Phillip Stephens 975b275334 Update submodules 2019-06-30 20:17:13 -07:00
Phillip Stephens 385f60cea3 Update boo 2019-06-30 20:15:40 -07:00
Jack Andersen 77af3f0ebd CPuddleToadGamma and animation system fixes 2019-06-20 20:02:56 -10:00
Jack Andersen 3256a05a99 Update boo 2019-06-20 20:02:34 -10:00
Jack Andersen 9ccc4227cb Initial support for asynchronous shader compilation 2019-06-15 20:25:29 -10:00
Jack Andersen 49eb971037 Update boo 2019-06-15 20:25:03 -10:00
Jack Andersen 37307e1cf6 Various CActorContraption fixes 2019-06-14 14:39:20 -10:00
Jack Andersen 4fa1a2f3b7 Fixes for ANCS cooking 2019-06-14 14:37:53 -10:00
Jack Andersen 6679f6de72 Windows build fixes 2019-06-12 15:33:35 -10:00
Jack Andersen 31caec79dd Windows build fixes 2019-06-12 15:29:52 -10:00
Jack Andersen e218b8aeb5 CActorContraption fixes, better CMake dependency handling 2019-06-11 16:05:17 -10:00
Jack Andersen 387f8fa864 Blender Python API updates and better CMake dependency handling 2019-06-11 16:01:19 -10:00
Jack Andersen b7aa3e06d2 Per-stage shader hashing 2019-06-05 14:07:50 -10:00
Jack Andersen 7cc157c8b9 Support for per-stage shader hashing 2019-06-05 14:07:29 -10:00
Jack Andersen 5e60131062 Metal Cubemaps 2019-06-02 21:51:44 -10:00
Jack Andersen 82fc24ebe6 Update boo 2019-06-02 21:51:26 -10:00
Jack Andersen 4a4cf58b6f HLSL cubemaps 2019-05-31 23:28:12 -10:00
Jack Andersen 4de7e2c0d6 Update boo 2019-05-31 23:27:44 -10:00
Jack Andersen 410d7896f7 Support for rendering dynamic cubemaps 2019-05-31 17:41:01 -10:00
Jack Andersen c8c6936e0c Update boo 2019-05-31 17:40:30 -10:00
Jack Andersen bf3ac9e34b macOS build fixes 2019-05-10 13:08:58 -10:00
Jack Andersen 50ca5553ab Ensure ApplicationReps.hpp is generated in binary directory 2019-05-10 13:08:05 -10:00