Commit Graph

339 Commits

Author SHA1 Message Date
Luke Street fcf7044bf2 Merge remote-tracking branch 'github/recovery' 2020-03-18 00:45:49 -04:00
Lioncash f45e2362c5 CPoseAsTransforms: Make use of std::array where applicable 2020-03-16 16:08:25 -04:00
Lioncash cc6d50a1aa CPoseAsTransforms: Mark constructor as explicit
Prevents potentially error-prone implicit constructions.
2020-03-16 16:05:52 -04:00
Luke Street 79f6dbac73
Merge pull request #228 from lioncash/time
CCharAnimTime: Make constructors constexpr where applicable
2020-03-15 19:46:39 -04:00
Luke Street 76f12c5c38
Merge pull request #227 from lioncash/pair
CAnimSourceReader: Minor cleanup
2020-03-15 19:46:21 -04:00
Luke Street 797c583ed7
Merge pull request #226 from lioncash/clamp
CAnimSource: Simplify ClampZeroToOne()
2020-03-15 19:45:37 -04:00
Lioncash 1926966d21 CCharAnimTime: Make constructors constexpr where applicable
These can be made constexpr to allow use at compile-time, given these
only hold an enum and a floating point value.
2020-03-15 19:41:54 -04:00
Lioncash 15db1b2647 CAnimSourceReader: Make use of std::find_if where applicable 2020-03-15 18:55:30 -04:00
Lioncash 9541ed1919 CAnimSourceReader: Make use of emplace() where applicable
Same behavior, but with less code.
2020-03-15 18:42:19 -04:00
Lioncash 7c1528688b CAnimSource: Simplify ClampZeroToOne()
We can make use of std::clamp instead of std::min and std::max
2020-03-15 18:30:58 -04:00
Phillip Stephens 6567ae8d42
Merge pull request #218 from lioncash/emplace
Runtime: Collapse emplace_back() calls where applicable
2020-03-13 15:30:43 -07:00
Phillip Stephens 75c184d710
CHierarchyPoseBuilder corrections 2020-03-13 15:29:20 -07:00
Lioncash 097d4a4422 Runtime: Collapse emplace_back() calls where applicable
Same behavior, but with less code.
2020-03-13 17:14:44 -04:00
Phillip Stephens 12ad192436
Merge pull request #204 from lioncash/move
Character/*: std::move constructor parameters where applicable
2020-03-12 15:09:00 -07:00
Luke Street 985daa3092 CCharAnimTime: Re-add algorithm include 2020-03-09 12:21:08 -04:00
Luke Street 24817d6b01 CCharAnimTime: Fixes & cleanup 2020-03-09 12:09:54 -04:00
Lioncash 39b561b089 CTransitionManager: std::move constructor parameters where applicable
Allows calling code to move into the constructor
2020-03-09 11:58:10 -04:00
Lioncash 3a96c574b2 CTransitionDatabaseGame: std::move constructor parameters where applicable
Same behavior, but allows the parameters to be moved into from calling
code.
2020-03-09 11:58:10 -04:00
Lioncash 815f492e0f CSequenceHelper: std::move constructor parameters where applicable
Same behavior, but allows for calling code to move into the interface.
2020-03-09 11:58:10 -04:00
Lioncash cff12f0986 TAnimSourceInfo: std::move constructor parameter where applicable
Allows calling code to move into the constructor.
2020-03-09 11:58:10 -04:00
Lioncash 9fe671af99 CAnimTreeSequence: std::move constructor parameters where applicable
Allows the constructor arguments to be moved into the constructor.
2020-03-09 11:58:07 -04:00
Lioncash fa23d0bb9c CAnimTreeLoopIn: std::move constructor parameters where applicable
Allows the constructor parameters to be moved into.
2020-03-09 11:31:53 -04:00
Lioncash ab17c1cf2f CAnimationManager: std::move parameters to constructor where applicable
Allows calling code to move into the respective arguments.
2020-03-09 11:27:36 -04:00
Lioncash e289643742 CAnimData: std::move constructor arguments where applicable
Same behavior, but allows calling code to move into the respective
parameters now.
2020-03-09 11:25:23 -04:00
Lioncash 79565d7f52 CAnimSourceInfo: std::move TSubAnimTypeToken instance in constructor
Provides the same behavior, but allows calling code to move into the
constructor.
2020-03-09 11:11:27 -04:00
Lioncash 3cec19437a CAnimSysContext: std::move TToken instance in constructor
Provides the same interface, but allows for calling code to move into
the constructor.
2020-03-09 11:08:17 -04:00
Lioncash 280e4ce07d CAnimTreeAnimReaderContainer: std::move shared_ptr in constructor
Provides the same behavior, but without a redundant atomic reference
count increment and decrement.
2020-03-09 11:06:20 -04:00
Lioncash 45c1bc9652 CStaticRes: Make use of CAssetId's IsValid() member function within operator bool
We should be testing against IsValid() here to handle all cases that
indicate invalid values, as opposed to only handling the zero case.
2020-03-08 22:49:33 -04:00
Lioncash 209cd4a54e CStaticRes: Make operator bool explicit
Prevents potentially error-prone conversions to bool. Similar to the
changes recently made to CToken.
2020-03-08 21:20:08 -04:00
Lioncash 2233a78fe2 CToken: Add HasReference() member function
Has the same semantics of operator bool(), but explains at the call site
what is actually being tested for in the relation to the object itself.

Aims to make readability slightly better (and removed the need for
casts).
2020-03-08 21:13:37 -04:00
Phillip Stephens 3e59f7a455
Prepare for pr-193 2020-03-08 18:01:29 -07:00
Phillip Stephens c9e7b2c2ff
Merge pull request #185 from lioncash/reference2
CParticleGenInfo: Fix missing ampersand in GetParticleSystem() member function
2020-03-06 16:13:22 -08:00
Lioncash 40277bedac CParticleGenInfo: Fix missing ampersand in GetParticleSystem() member function
Previously the particle system shared pointer would always be returned
by value, rather than by reference.
2020-03-05 21:36:04 -05:00
Lioncash 4c90adf074 CHierarchyPoseBuilder: Fix missing ampersand in CharLayoutInfo() return value
Previously this function was always returning by value, rather than by
reference, like what its contained called function does.
2020-03-05 21:28:23 -05:00
Luke S e0b84df5de
Merge pull request #172 from lioncash/move
CCharacterInfo: Minor allocation related changes
2020-02-28 10:39:35 -05:00
Luke S e7de5311c2
Merge pull request #171 from lioncash/const
CPAS*: Minor cleanup
2020-02-28 10:37:36 -05:00
Lioncash 718d8d5d6f CPASParmInfo: Make data members private
These aren't used outside of the class, we only need to make
EWeightFunction public.
2020-02-28 05:00:16 -05:00
Lioncash 9524208cd2 CCharacterInfo: Remove unnecessary top-level const in return value of GetAnimationIndex()
Same behavior, less code.
2020-02-28 04:56:45 -05:00
Lioncash 63cf485f27 CCharacterInfo: std::move std::string instance where applicable
Avoids potentially reallocating strings where it's not necessary to do
so.
2020-02-28 04:55:09 -05:00
Lioncash 435a6ea1d4 CCharacterInfo: Make use of emplace_back() where applicable
We can construct these elements in place. While we're at it, we can mark
the count variables at const to be explicit.
2020-02-28 04:51:18 -05:00
Lioncash d2c86f98d1 CCharacterInfo: std::move vectors in CParticleResData's constructor
Same behavior, but allows the caller to move into the constructor,
potentially avoiding copies altogether.
2020-02-28 04:49:07 -05:00
Lioncash d79b9d925e CPAS*: Make constructors explicit
Prevents undesirable implicit constructions from occurring.
2020-02-28 04:38:23 -05:00
Lioncash fe05c42be4 CPASAnimState: Remove const_cast usages
A cache is typically a use case for mutable (as the outside user of the
class wouldn't directly rely on the cache as part of the API, this would
only function to assist the API perform better), so we can mark the
selection cache as mutable and make the code nicer to read overall.
2020-02-28 04:33:42 -05:00
Luke S 751838f00e
Merge pull request #166 from lioncash/redundant
CGroundMovement: Collapse 'dampUnderwater ? 0.2f : 0.2f' conditional
2020-02-26 13:19:22 -05:00
Lioncash 62330903cc CGroundMovement: Collapse 'dampUnderwater ? 0.2f : 0.2f' conditional
The conditional itself aside, in GM8E v0, this is always assigned as
0.2f.
2020-02-26 04:18:58 -05:00
Lioncash 6afcf634b0 CGroundMovement: Set optsCopy's wall elastic constant to 0.03f
In GM8E v0, the wall elastic constant of the copied SMovementOptions
instance is set to 0.03f.
2020-02-26 04:12:09 -05:00
Lioncash 1cb289f243 RuntimeCommon: Normalize cpp inclusions
Normalizes the headers for the cpp files in the RuntimeCommon target.
Now all headers and source files within the RuntimeCommon/RuntimeCommonB
targets are normalized and consistent with one another.
2020-01-15 09:15:47 -05:00
Phillip Stephens 841996a872
More work on CThardus 2020-01-05 20:24:54 -08:00
Phillip Stephens 34e78a2dd0
Move CParticleGlobals from the executable and onto the heap, minor fixes, update wiki link 2019-12-03 00:47:05 -08:00
Phillip Stephens 8b6dff70b4
Properly cleanup Xorg in visigen, various fixes and cleanups in URDE, more CRidley imps 2019-11-19 15:06:25 -08:00