Commit Graph

467 Commits

Author SHA1 Message Date
Luke Street 1e15e0d1f3 Merge remote-tracking branch 'origin/master' into elitepirate
# Conflicts:
#	Runtime/World/CPatterned.hpp
2020-04-01 15:02:56 -04:00
Lioncash 233b2ccbbf CSegStatementSet: Make use of std::array
Same behavior, but without implicit array to pointer decay.
2020-04-01 00:36:50 -04:00
Lioncash c02d5a91b8 CSegStatementSet: Make x4_segData private
Accessors already exist to access the data individually, so we can just
use those instead.
2020-04-01 00:34:12 -04:00
Lioncash 7117e298d9 IVaryingAnimationTimeScale: Add virtual destructor
This is used in a polymorphic context, so we should be specifying a
virtual destructor to prevent undefined behavior when deleting instances
from the base class.
2020-03-31 23:55:15 -04:00
Lioncash 91f75a4c60 IAnimReader: Add missing override specifiers 2020-03-31 06:11:08 -04:00
Lioncash 2f0d774ed8 General: Make use of emplace_back where applicable 2020-03-31 05:33:10 -04:00
Lioncash 7b9018dbf0 CModelData: Initialize m_drawInstCount to zero
Allows for deterministic initial state to make debugging nicer.
2020-03-31 04:53:04 -04:00
Lioncash 1415265ef2 Runtime: Default destructors where applicable
Same behavior, but allows the destructors to be trivial, etc.
2020-03-31 04:50:26 -04:00
Phillip Stephens d167293552
Merge pull request #291 from lioncash/name
IAnimReader: Make use of std::string_view where applicable
2020-03-31 01:20:20 -07:00
Phillip Stephens 7b0c043721
Merge pull request #288 from lioncash/explicit
Runtime: Add more usages of explicit
2020-03-31 01:19:40 -07:00
Lioncash 67f6666ea1 Runtime: Add more usages of explicit
Prevents error-prone implicit conversions where applicable.

This targets the regular RuntimeCommon target this time around.
2020-03-31 03:53:49 -04:00
Lioncash 2c36b0bb83 IAnimReader: Make use of std::string_view where applicable
Same behavior, but allows interoperating with different string types in
a more straightforward manner.
2020-03-31 03:13:02 -04:00
Lioncash aa8d147350 CAnimTreeDoubleChild: Correct call to VGetBoolPOIState() in VGetInt32POIState()
Like the previous change, it's awfully suspect to be interpreting all
integer values as bools.
2020-03-31 02:43:48 -04:00
Lioncash 03c0a8a5f6 CAnimTreeAnimReaderContainer: Correct call to VGetBoolPOIState() within VGetInt32POIState()
It seems quite suspect to read all integral values as bools.
2020-03-31 02:06:56 -04:00
Lioncash 260dbaca7d CAnimData: Rename IceModel() to GetIceModel()
Allows const overloading to work and prevents compilation errors from
occuring if the const qualifier on an instance changes over refactoring.
2020-03-31 01:26:00 -04:00
Luke Street 4ada5a00cb CElitePirate: Nearly complete implementation 2020-03-29 03:28:14 -04:00
Lioncash 74600588fa Add missing includes pt.2
Some missing includes that actually need to be present.
2020-03-26 03:14:03 -04:00
Lioncash 51afa94e8c Add missing includes where applicable
Resolves a few required dependencies
2020-03-26 01:10:55 -04:00
Luke Street 7ee2a3b912
Merge pull request #254 from AxioDL/flyingpirate
CFlyingPirate implementation
2020-03-25 03:01:10 -04:00
Lioncash a862b792de CBoneTracking: Make use of parameter in SetActive()
GM8E v0 makes use of the parameter and doesn't always set the value to
true.
2020-03-25 02:12:56 -04:00
Lioncash 22036859db CPASDatabase: Add names to parameters in prototypes
Makes IDE introspection better.
2020-03-25 01:43:27 -04:00
Lioncash fad980dc19 CBodyController: Make HasBodyInfo() accept a const reference
This only queries state and doesn't actually modify it.
2020-03-25 01:39:08 -04:00
Lioncash f875bdf024 CBodyController: Add names to parameters in interface
Makes the interface more self-documenting and allows IDEs to perform
better introspection at call sites.
2020-03-25 01:36:54 -04:00
Lioncash cd184daeba CAnimData: Give names to function prototype parameters
Provides at least some form of name for all functions in the interface.
This allows IDEs to perform proper name inspection (as well as being
slightly more informative to the reader in some cases).
2020-03-22 05:42:11 -04:00
Luke Street 851304ded9 CFlyingPirate: Finish Think implementation 2020-03-18 02:53:53 -04:00
Luke Street 932615593e CFlyingPirateRagDoll: Implement PreRender, Prime 2020-03-18 01:20:24 -04:00
Luke Street 26ae8beb74 CFlyingPirate: Small fixes 2020-03-18 01:19:23 -04:00
Luke Street 13d8c3fdd1 CFlyingPirate: First draft almost done 2020-03-18 01:18:48 -04:00
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
Phillip Stephens 6c1f682e0f
Initial CRidley implementation 2019-11-09 15:48:46 -08:00
Phillip Stephens e5c8592d5a
Merge pull request #118 from lioncash/seg
CSegId: Minor changes
2019-10-26 19:51:08 -07:00
Lioncash 660d092cad CSegId: Add member functions for querying validity
Allows querying validity of segment IDs without hardcoding the magic
value that signifies an invalid ID.
2019-10-26 22:43:11 -04:00
Phillip Stephens 118fb22ce0
Merge pull request #117 from lioncash/layout
CCharLayoutInfo: Minor changes
2019-10-26 18:37:59 -07:00
Lioncash 30af6f0bfb CSegId: Make constexpr capable
Allows the class to be used within constexpr contexts, given it's such a
small class.
2019-10-26 21:36:30 -04:00
Lioncash 69831b4a13 CCharLayoutInfo: Make constructors explicit
Makes constructions of the types visibly explicit, given they aren't
conversion constructors.
2019-10-26 21:27:03 -04:00
Lioncash bb9da96870 CCharLayoutInfo: Invert conditional within GetFromParentUnrotated()
Inverts the conditional to be in terms of the true case, making it a
little nicer to read.
2019-10-26 21:24:10 -04:00
Lioncash 9193f4c4d7 CCharLayoutInfo: Make use of const where applicable
Makes trivial variables const to make it explicit that they aren't
modified.
2019-10-26 21:21:57 -04:00
Lioncash 293d19cf13 CCharLayoutInfo: std::move std::string instance in CCharLayoutInfo constructor
Avoids performing a copy (and by extension also avoids redundant
allocations).
2019-10-26 21:19:57 -04:00
Lioncash e7b0470f55 CCharLayoutInfo: Use heterogenous lookup with std::map
Allows using std::string_view with std::map without the need to
construct a completely new std::string instance. Making the lookups via
GetSegIdFromString() completely non-allocating.

Notably, this also allows it to properly function with
non-null-terminated string_view instances.
2019-10-26 21:17:49 -04:00
Phillip Stephens 0042e44521
Merge pull request #116 from lioncash/name
CParticleGenInfo: Use slightly more full names for parameters where applicable
2019-10-26 17:51:57 -07:00
Lioncash bbdfe3d962 CParticleGenInfo: Provide slightly more full names for parameters where applicable
Makes Intellisense and any function highlighting systems a little more
informative.
2019-10-26 20:37:35 -04:00
Lioncash a82dd4f11f CParticleGenInfo: Name bool parameter for SetParticleEmission
Allows the parameter name to be visible in code completion and
highlighting.
2019-10-26 20:32:44 -04:00
Lioncash eae1a1d06d CAnimData: Remove usage of const_cast within Touch()
We can just call the function normally without the need for a
const_cast.
2019-10-23 20:44:19 -04: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 a633b8e8fd General: Normalize RuntimeCommon include paths
Performs the same normalizing done to the RuntimeCommonB target, now all
of the runtime headers have normalized include paths.
2019-09-28 04:14:29 -04:00
Lioncash 36d04456dd General: Normalize RuntimeCommonB include paths
Finishes the normalizing of all of includes within the RuntimeCommonB target's headers.
2019-09-23 17:22:37 -04:00
Phillip Stephens 68e2fad74f
Fix TCastTo.hpp inclusions, add comment to warn against modifying include path 2019-09-21 06:07:13 -07:00
Lioncash f9079f0215 Runtime: Make use of std::make_unique where applicable
Makes use of the C++14 make_unique allocation function to allocate class
instances where applicable instead of a reset with a new operator within
it.

This doesn't touch cases where buffers are allocated, given make_unique
would zero-initialize them.
2019-09-12 04:09:48 -04:00
Lioncash afab3e0327 Runtime: Make const/non-const getters have the same name
Makes for a more consistent interface, as getters won't have different
names to remember based off whether or not they're const qualified.
2019-08-14 12:45:57 -04:00
Lioncash d3d629d405 RuntimeCommon: Use const on member functions where applicable
Adds missing const qualifiers on class member functions that don't
modify instance state.
2019-08-14 09:25:39 -04:00
Phillip Stephens 1e625e0995 Fix missed `override` declarations 2019-08-09 15:07:52 -07:00
Lioncash 9312eef905 RuntimeCommon: Use override where applicable
Continues the override modernization by applying it to the main
RuntimeCommon target. Resolves around 1100+ cases where override can be
used.
2019-08-09 17:39:42 -04:00
Jack Andersen b4fe474de3 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2019-07-19 18:29:06 -10:00
Jack Andersen 7a3da1f7a6 Massive fmtlib refactor 2019-07-19 18:27:21 -10:00
Phillip Stephens 328749d1ba More CFlaahgra imps, initial CTryclops imps 2019-07-16 08:54:07 -07:00
Phillip Stephens 44cae7bdb9 More CFlaahgra imps 2019-06-26 18:06:03 -07:00
Phillip Stephens a67ea52617 More CFlaahgraImps 2019-06-20 14:22:06 -07:00
Phillip Stephens 6ae550e9d6 More CFlaahgra imps 2019-06-17 18:39:56 -07:00
Jack Andersen bfa5b218f0 Remove unneeded debug messages 2019-06-11 16:20:15 -10:00
Jack Andersen 0e8e3e906c Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2019-06-11 16:05:44 -10:00
Jack Andersen e218b8aeb5 CActorContraption fixes, better CMake dependency handling 2019-06-11 16:05:17 -10:00
Phillip Stephens b7b65b04a4 Initial Flaahgra implementations 2019-06-10 01:28:33 -07:00
Phillip Stephens b18576cf58 Initial CMagdolite imps 2019-05-14 15:30:15 -07:00
Jack Andersen 3a0d2930fa Numerous uninitialized memory fixes 2019-04-06 19:14:48 -10:00
Jack Andersen b72cc490e8 Implement CFishCloud 2019-04-02 18:32:31 -10:00
Jack Andersen a63a61fef8 Implement CWallCrawlerSwarm 2019-03-23 22:06:59 -10:00
Jack Andersen 99b1a8ef49 Lots of bug fixes 2019-03-12 17:46:20 -10:00
Jack Andersen 2f963b9ce3 Various bug fixes 2019-03-08 22:58:27 -10:00
Jack Andersen 4b042f6f9a OpenGL memory leak fix 2019-03-04 22:34:43 -10:00
Jack Andersen 67b9882dbe Thermal visor fixes 2019-02-24 22:14:59 -10:00
Jack Andersen 8df0a4913c zeus constexpr refactor and thermal visor fixes 2019-02-23 21:15:54 -10:00
Jack Andersen 48eaa2545b Working CScriptGunTurret 2019-02-17 19:47:46 -10:00
Jack Andersen 5f8b65e3b5 Various bug fixes 2019-02-07 15:08:15 -10:00
Jack Andersen ad2681f857 Windows fixes 2019-01-28 22:28:35 -10:00
Phillip Stephens 049f51382b Initial CAtomicBeta imps, needs variable names 2019-01-22 21:59:53 -08:00
Phillip Stephens 05e5fb9774 More CBabygoth Imps 2019-01-20 14:28:25 -08:00
Jack Andersen 47c6b5cba8 Bug fixes and CGuiFrame mouse events 2019-01-19 20:43:11 -10:00
Jack Andersen 851e113dc0 Implement CWarWasp 2019-01-15 18:22:44 -10:00
Jack Andersen 5b55320e9b Implement CPlasmaProjectile 2019-01-02 17:47:28 -10:00
Phillip Stephens 4f3c8daf27 Initial CBabygoth imps 2018-12-31 00:37:52 -08:00
Jack Andersen 147a9396c4 CBeetle implementation 2018-12-30 19:01:42 -10:00
Jack Andersen 0ec81477cf CRagDoll fixes 2018-12-26 20:26:34 -10:00
Phillip Stephens 6fe99a7ddf Finish CFlickerBat imps 2018-12-16 21:40:27 -08:00
Jack Andersen b7f35e0528 CRelAngle fix 2018-12-16 17:52:51 -10:00
Jack Andersen dac8fc3eb5 Space pirate bug fixes 2018-12-14 20:29:41 -10:00
Jack Andersen ec1cb75b25 Finish CSpacePirate implementation 2018-12-12 21:39:16 -10:00
Jack Andersen 14747e39e1 Windows fixes 2018-12-07 20:46:17 -10:00
Jack Andersen 636c82a568 New code style refactor 2018-12-07 19:30:43 -10:00
Jack Andersen 41ae32be31 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2018-12-07 18:36:12 -10:00
Jack Andersen 7c7da6671a SIMD refactor 2018-12-07 15:49:15 -10:00
Phillip Stephens dd705a3db9 Implement CSeedling 2018-12-05 16:46:35 -08:00
Phillip Stephens 0ec9f1f4eb Finish CSpankWeed 2018-12-03 18:31:15 -08:00
Jack Andersen e1fa938127 Work on CSpacePirate 2018-11-25 16:15:44 -10:00
Jack Andersen 9c88971df6 Initial CSpacePirate and rag doll imps 2018-11-23 22:09:35 -10:00
Jack Andersen e736d8fa83 Fix CAnimSource reader POI handling 2018-11-20 14:51:15 -10:00
Phillip Stephens 96f20512bb More CScriptSpecialFunction imps, fix intermittent crash in CAnimTreeTweenBase 2018-11-18 21:01:39 -08:00
Jack Andersen 22da3a0f89 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2018-11-18 15:19:58 -10:00
Jack Andersen 35a3923cdf Various bug fixes 2018-11-18 15:19:44 -10:00
Phillip Stephens b2b0a6aee0 CMetaree imps 2018-11-17 21:10:06 -08:00
Jack Andersen b099be63dd Bug fixes 2018-11-17 14:10:26 -10:00