Commit Graph

486 Commits

Author SHA1 Message Date
Lioncash 11c40415f5 TXTR: Mark constexpr functions static
Same behavior, but makes them internally linked.
2020-03-31 20:36:45 -04:00
Lioncash d3295cbb87 TXTR: Make use of const(typedefs) where applicable
Same behavior, but signifies read-only semantics.

Also resolves a few -Wcast-qual warnings.
2020-03-31 17:36:17 -04:00
Lioncash 8132375c69 TXTR: Eliminate variable shadowing 2020-03-31 17:02:55 -04:00
Lioncash d337327b97 DNACommon: Mark hash overloads as noexcept
These functions shouldn't throw at all.

By extension, also mark the UniqueID class interfaces as noexcept.
2020-03-31 16:55:19 -04:00
Lioncash d8ed1a5e79 RetroDataSpec: Convert typedefs to using aliases
Same behavior, but nicer to read.
2020-03-31 13:11:24 -04:00
Lioncash 9ef2fbba5a RetroDataSpec: Make use of make_unique where applicable
Same behavior, but without a mildly wonky way of performing it.
2020-03-31 13:06:27 -04:00
Lioncash 315becf1b5 ATBL: Collapse std::vector construction and resize into one another
Same behavior, less code.
2020-03-31 07:36:26 -04:00
Lioncash 3e084d2ae2 AROTBuilder: Convert defines into constexpr variables
Same behavior, but with concrete types.
2020-03-31 07:33:25 -04:00
Lioncash da4b1d5e7d AROTBuilder: Collapse manual loops into ranged for loops
Same behavior, minus the induction variable to follow
2020-03-31 07:31:04 -04:00
Lioncash 84141eeb25 AROTBuilder: Eliminate variable shadowing 2020-03-31 07:31:04 -04:00
Lioncash a2709f1d20 AROTBuilder: Make use of std::array where applicable
While we're at it, we can dehardcode some sizes.
2020-03-31 07:31:01 -04:00
Jack Andersen 566b15766c Refactor particle serialization to use generative meta-information 2020-03-28 21:29:27 -10:00
Phillip Stephens 1c5fd85b57
Correct ITweakPlayerRes offset 2020-03-01 16:56:38 -08:00
Lioncash 3f3b0e6ba8 ITweakPlayerRes: Make use of std::array where applicable
Performs the same changes that were recently applied to ITweakGunRes for
consistency. Also eliminates some sign conversion warnings and
deduplicates some array sizes.
2020-02-28 01:50:32 -05:00
Luke S 08604d770a
Merge pull request #163 from lioncash/data
ITweakGunRes: Minor cleanup
2020-02-25 22:32:25 -05:00
Lioncash e80d9c7192 ITweakGunRes: Make use of std::array where applicable
Deduplicates a few array sizes and makes the member variables more
strongly typed.
2020-02-25 15:50:37 -05:00
Lioncash b608a72aad ITweakGunRes: Remove unnecessary c_str() calls
These functions already return the data type that GetResourceIdByName()
expects. Has the side-effect of also eliminating unnecessary strlen
calls.
2020-02-25 15:34:22 -05:00
Lioncash a92bc16265 ITweakPlayerRes: Remove unnecessary calls to .data()
All of these functions return a string_view, which is accepted by
GetResourceIdByName(), so this avoids several unnecessary std::strlen
calls.
2020-02-25 02:09:45 -05:00
Lioncash 189b03c001 ITweakPlayerRes: Fix mismatched icon retrievals within ResolveResources()
Previously, all of these icons were using the first top icon, rather
than their own respective icons.

This amends that.
2020-02-25 02:07:15 -05:00
Luke Street cce11d3cd9 Blender 2.81 support 2019-12-10 18:45:55 -05:00
Jack Andersen e1d46755a3 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2019-09-30 21:41:42 -10:00
Jack Andersen 16ca0d24c2 Explicit Asset ID refactor 2019-09-30 21:38:03 -10:00
Lioncash 5b7f159233 General: Be explicit about athena's Endian type
Allows this code to still compile if the Endian type is ever changed
into a strong enumeration.
2019-09-14 11:01:01 -04:00
Lioncash 9c0d13f001 DataSpec: Be explicit about athena's SeekOrigin type
Allows code to still function properly if the enum is changed into an
enum class.
2019-09-07 21:20:01 -04:00
Lioncash 8556a74196 WPSC: Correct typo within WPSM's _read() function
This should be calling read() on xunk_SPS1, not xunk_SPS2
2019-09-06 08:42:35 -04:00
Lioncash 7a0e7f449e PAK: Make operator bool() explicit for PAKEntryReadStream
Prevents potential error-prone conversions to bool.
2019-09-05 00:59:32 -04:00
Lioncash 107dfc4203 PAK: Zero initialize m_sz and m_pos of PAKEntryReadStream
Provides a deterministic initial state for the members in the case of
the default constructor.
2019-09-05 00:57:57 -04:00
Phillip Stephens 256994c199
Initial CEnergyBall, update submodules, various fixes 2019-08-31 02:02:21 -07:00
Phillip Stephens 3ca09f60db
atdna fixes 2019-08-26 20:02:31 -07:00
Lioncash 1d3062b33f General: Make use of FopenUnique where applicable
Migrates to the hecl Fopen variant that automatically closes its
contained file handle if it goes out of scope.
2019-08-26 15:03:58 -04:00
Phillip Stephens 4ac54f39cd Merge branch 'fwd' of https://github.com/lioncash/urde into lioncash-fwd 2019-08-23 20:43:15 -07:00
Lioncash 7f7a18a708 DataSpec/DNACommon: Resolve indirect includes where applicable
Avoids indirect inclusions where applicable and includes the necessary
headers as used by the interface. This way, it prevents code from
failing to compile due to changes in other header inclusions.
2019-08-23 22:03:03 -04:00
Phillip Stephens f2b551b89b Minor compile fixes, fix potential undefined behavior in CMDL.cpp 2019-08-23 17:09:21 -07:00
Lioncash b064967de8 DNACommon: Replace platform-specific string conversion functions with standard facilities
These can be replaced with std::strtoull and std::wcstoull, eliminating
a platform-specific ifdef.
2019-08-23 14:27:00 -04:00
Phillip Stephens d4b36699b7
Merge pull request #43 from lioncash/spec-const
RetroDataSpec: Make member functions const where applicable
2019-08-15 07:46:46 -07:00
Lioncash 11098374a4 RetroDataSpec: Use fmt::print where applicable
Replaces uses of fprintf with fmt::print where applicable. For trivial
character insertion, we can make use of fputc instead of fprintf.
2019-08-14 22:44:49 -04:00
Lioncash 2517fac404 RetroDataSpec: Make member functions const where applicable
Marks member functions that don't modify instance state as const.
2019-08-14 22:25:15 -04:00
Phillip Stephens ad5e395a51 Fixes for `override` modernization 2019-08-10 17:49:41 -07:00
Lioncash a5a2516138 RetroDataSpec: Use override where applicable
Continues the override modernizations, applying the keyword where
applicable to the RetroDataSpec target.
2019-08-10 00:24:30 -04:00
Phillip Stephens ff83dbc676 Minor fixes and cleanup 2019-08-03 17:02:53 -07:00
Phillip Stephens 9d2cbf61ed Add texture cache containing information about textures 2019-08-03 16:44:52 -07:00
Jack Andersen 0ab08daae7 Windows build fixes 2019-07-27 15:21:31 -10:00
Jack Andersen 7a3da1f7a6 Massive fmtlib refactor 2019-07-19 18:27:21 -10:00
Jack Andersen 77af3f0ebd CPuddleToadGamma and animation system fixes 2019-06-20 20:02:56 -10:00
Jack Andersen 87023b432e Fixes in ANIM cooking 2019-06-15 16:22:23 -10:00
Jack Andersen 37307e1cf6 Various CActorContraption fixes 2019-06-14 14:39:20 -10:00
Jack Andersen e218b8aeb5 CActorContraption fixes, better CMake dependency handling 2019-06-11 16:05:17 -10:00
Jack Andersen 233d13ceb9 Refactor for blender 2.8 and new shader model 2019-05-07 17:50:21 -10:00
Jack Andersen 3a0d2930fa Numerous uninitialized memory fixes 2019-04-06 19:14:48 -10:00
Jack Andersen f40bf707f6 DCLN OBB transform fix 2019-03-07 18:16:42 -10:00