Commit Graph

260 Commits

Author SHA1 Message Date
Lioncash a952ff1110 CCollisionEdge: Make constructors constexpr
Makes the default and non-stream iterator constexpr, which allows for
elimination of a runtime initializer.
2020-04-05 06:46:03 -04:00
Lioncash af6e3b21f8 COBBTree: Make use of std::array where applicable 2020-04-05 06:41:22 -04:00
Lioncash 8a732194a6 CGameCollision: Eliminate the use of const_cast 2020-04-05 00:30:58 -04:00
Lioncash 0ae638eef9 CCollisionActorManager: Make use of std::nullopt
Gets rid of unnecessary zeroing out of the internal buffer on some
implementations.
2020-04-02 02:08:15 -04:00
Lioncash 6931737aef CCollisionActorManager: Minor tidying
Bracing consistency and using const where applicable.
2020-04-02 02:06:44 -04: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 51afa94e8c Add missing includes where applicable
Resolves a few required dependencies
2020-03-26 01:10:55 -04:00
Luke Street f91536ebee Merge branch 'pr-276' 2020-03-25 02:09:05 -04:00
Lioncash 855fc0ced9 CAreaOctTree: Add names to parameters in prototypes
Allows IDEs to perform better inspections at call sites.
2020-03-25 00:45:33 -04:00
Lioncash f323638fb7 CCollisionActor: Provide parameter names in interface where applicable
Makes the interface more self-documenting at a glance and allows IDEs to
do better parameter inspection at call sites.
2020-03-24 21:16:30 -04:00
Luke Street 66c321d4a8
Merge pull request #246 from lioncash/def
CCollisionInfoList: Simplify definition of begin() and end()
2020-03-18 01:04:19 -04:00
Lioncash 457c116275 CCollisionInfoList: Simplify definition of begin() and end()
Same behavior, but without a verbose return type.
2020-03-17 21:41:54 -04:00
Lioncash a9082bc445 CCollisionActor: Mark gkDefaultCollisionActorMaterials as constexpr
While we're at it, change the g to s, since it's internally linked.
2020-03-15 20:04:15 -04:00
Phillip Stephens e43bfe1e58
More CChozoGhost imps 2020-03-05 07:42:12 -08:00
Lioncash 9cb5d11405 CollisionUtil: Replace FINDMINMAX macro with std::minmax()
Same thing, but already provided by the language.
2020-02-28 02:27:24 -05:00
Phillip Stephens 60f8dfb9d1
Final CCollisionInfoList imps 2020-02-07 14:20:04 -08: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 21159e604e
More CThardus 2019-12-14 15:50:29 -08:00
Phillip Stephens a1c7692d36
More CRidley imps 2019-11-12 12:25:21 -08:00
Phillip Stephens 6c1f682e0f
Initial CRidley implementation 2019-11-09 15:48:46 -08:00
Phillip Stephens b87f94802d
Merge pull request #120 from lioncash/collision
CCollisionResponseData: Minor changes
2019-10-30 01:13:40 -07:00
Phillip Stephens ec7f6804cb
Merge pull request #119 from lioncash/constexpr
CollisionPrimitive: Make collision primitive types constexpr capable
2019-10-30 01:13:31 -07:00
Lioncash fff7b90c85 CCollisionResponseData: In-class initialize primitives
Avoids needing to give them their own entry within the constructor
initializer list.
2019-10-29 19:43:23 -04:00
Lioncash 156c0e8cd0 CCollisionResponseData: Name parameters in function declarations
Allows IDEs and other introspection tools to be more useful when
indicating parameters in function calls.
2019-10-29 19:41:53 -04:00
Lioncash 9c391f90e3 CCollisionResponseData: Join vector initializations into constructor initializer list
Generally provides marginally better code generation.

We can also fill x10_sfx with the invalid SFX constant at the same time
instead of performing a resize and then filling it again.
2019-10-29 19:41:53 -04:00
Lioncash 3d67088697 CCollisionResponseData: Make use of std::array where applicable
Allows us to replace some heap allocating file-scope std::vector
instances with constexpr std::arrays, eliminating quite a few static
constructors.
2019-10-29 19:41:48 -04:00
Lioncash c1beec5bb0 CCollisionResponseData: Organize cpp inclusions
Organizes them alphabetically to make for better human reading.
2019-10-29 19:27:21 -04:00
Lioncash d7dd256d38 CollisionPrimitive: Make use of constexpr types where applicable
We can now mark some usages of these types as constexpr and also make
them fully internal to the translation unit.
2019-10-29 18:36:26 -04:00
Lioncash 5c7bb9e7d7 CollisionPrimitive: Make collisition primitive types and comparisons constexpr capable
Allows them to be used within constexpr contexts.
2019-10-29 18:36:21 -04: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 668f8da97d
Merge pull request #106 from lioncash/find
CCollisionPrimitive: Simplify the InitAdd* member functions
2019-10-12 07:29:13 -07:00
Lioncash 5f4aba60e1 CCollisionPrimitive: Simplify the InitAdd* member functions
We can extract the duplicated behavior out into its own member function
and then reuse it in order to deduplicate repeated behavior.

This allows simplifying the member functions in a manner that allows
declaring most of the variables const. The lack of mutable behavior
within these functions makes it much nicer to read.
2019-10-12 00:27:18 -04:00
Lioncash d2a44dbc0b CollidableAABox: Default destructor
Same behavior, but remains consistent with the rest of the codebase.
2019-10-11 22:53:01 -04:00
Lioncash da4a33f01a CCollisionPrimitive: Default virtual destructor
Same behavior, but more consistent with the existing interface, given
a constructor is defaulted.
2019-10-11 22:39:58 -04:00
Lioncash 9cbe8ba885 CCollisionPrimitive: Use using for type aliases where applicable
Same behavior, better readability.
2019-10-11 22:36:57 -04:00
Lioncash 4442421586 ICollisionFilter: Use forward declarations where applicable
With the headers all normalized, we can safely convert the only
ICollisionFilter include into a forward declaration.
2019-09-30 17:20:59 -04: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
Phillip Stephens 68e2fad74f
Fix TCastTo.hpp inclusions, add comment to warn against modifying include path 2019-09-21 06:07:13 -07:00
Lioncash 2d8111531f CMaterialFilter: Make interface constexpr
A few instances of CMaterialFilter are constructed at file-scope using
the Make* functions and the constructor. Given these aren't constexpr,
this means these are technically runtime function calls. We can make
these constexpr to allow the initialization to be done at compile-time,
slightly improving startup time.
2019-09-18 13:00:04 -04:00
Lioncash 0e39c64bfc CMaterialList: Make interface constexpr 2019-09-18 12:45:11 -04:00
Lioncash 1f13fc05a0 CMaterialFilter/CMaterialList: Amend inclusions 2019-09-18 12:38:14 -04: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 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 ebdcfb6b51 Initial CMetroidBeta imps 2019-08-11 08:14: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 003146f614 Work on CBabygoth 2019-06-29 21:29:49 -10:00
Phillip Stephens 568e15a89a More Flaahgra imps 2019-06-18 18:55:38 -07: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
Jack Andersen 3a0d2930fa Numerous uninitialized memory fixes 2019-04-06 19:14:48 -10:00
Jack Andersen 8e2db0795b Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2019-03-23 22:07:22 -10:00
Jack Andersen a63a61fef8 Implement CWallCrawlerSwarm 2019-03-23 22:06:59 -10:00
Phillip Stephens 27643313f9 Implement CBloodFlower and more CBabygoth imps 2019-03-22 17:36:10 -07:00
Jack Andersen 2f963b9ce3 Various bug fixes 2019-03-08 22:58:27 -10:00
Jack Andersen f40bf707f6 DCLN OBB transform fix 2019-03-07 18:16:42 -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 01af7b735d Implement CScriptSpindleCamera 2019-02-09 18:41:35 -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
Jack Andersen d60fcc99c9 Fix CNewIntroBoss and particle bugs 2019-01-04 17:28:02 -10:00
Phillip Stephens 4f3c8daf27 Initial CBabygoth imps 2018-12-31 00:37:52 -08:00
Jack Andersen 0ec81477cf CRagDoll fixes 2018-12-26 20:26:34 -10:00
Phillip Stephens d657a8ecf6 Implement CAtomicAlpha 2018-12-17 20:42:17 -08:00
Jack Andersen dac8fc3eb5 Space pirate bug fixes 2018-12-14 20:29:41 -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 0ec9f1f4eb Finish CSpankWeed 2018-12-03 18:31:15 -08:00
Phillip Stephens 9948532957 Initial CPuddleToadGamma imps 2018-11-30 16:44:33 -08:00
Jack Andersen 35a3923cdf Various bug fixes 2018-11-18 15:19:44 -10:00
Phillip Stephens ea4848196a Implement CNewIntroBoss 2018-11-16 21:05:57 -08:00
Jack Andersen 660e7cd239 Work on CParasite 2018-11-12 23:20:11 -10:00
Jack Andersen bf3636a16e Lots of CParasite implementations 2018-11-11 18:21:36 -10:00
Phillip Stephens 89ece2e9b2 Proper CRandom16 usage
More CScriptGunTurret imps
2018-11-09 18:48:06 -08:00
Jack Andersen d140f35886 All CEnvFxManager effects working 2018-11-02 22:46:12 -10:00
Phillip Stephens dd30f51761 Initial CScriptGun implementation, more loaders 2018-10-27 17:20:30 -07:00
Jack Andersen c91e5df986 Convert to pragma once 2018-10-06 17:42:33 -10:00
Jack Andersen e46ec80b64 Integrate Amuse into hecl cook/extract for MP1/2 2018-09-02 14:46:16 -10:00
Jack Andersen ef1f9d564c Big Door initial animation fix 2018-06-29 15:35:43 -10:00
Jack Andersen d0af2cb4f7 Finish CScriptPlatform 2018-06-29 10:21:36 -10:00
Jack Andersen 3a9e7b2f9b PVS and DCLN bug fixes 2018-06-27 20:47:34 -10:00
Jack Andersen cfe384b5c2 Better octree generation density 2018-06-23 13:09:16 -10:00
Jack Andersen bc9d225c89 Fix boost ball and other collision issues 2018-06-21 19:11:20 -10:00
Jack Andersen cd3bba2f0e Working grapple beam 2018-06-20 14:57:57 -10:00
Jack Andersen cc6d79e280 Various bug fixes 2018-05-26 18:22:38 -10:00
Jack Andersen 98549a7785 Merge branch 'master' of ssh://git.axiodl.com:6431/AxioDL/urde 2018-05-24 20:40:18 -10:00
Jack Andersen 70b3404b7c Windows build fixes and warning avoidance 2018-05-24 20:39:38 -10:00
Phillip Stephens 48f41b6c73 Minor fixes to CMetroidAreaCollider and CHudThreatInterface 2018-05-24 18:23:27 -07:00
Phillip Stephens f5ea144b47 Various level streaming fixes, remove support for uncooked rep 2018-05-06 17:47:40 -07:00
Phillip Stephens 711c3e0d2c Remove rstl::optional_object, various cleanups, implement CExplosion and CScriptDoor 2018-04-29 20:12:41 -07:00
Phillip Stephens 6d60ccfd04 Various fixes and tweaks, Implement CExplosion, Add cheats 2018-04-26 14:12:20 -07:00
Jack Andersen 7100ed437f macOS decal rendering support 2018-03-16 17:41:01 -10:00
Jack Andersen 08569104c2 Projectile collision fix 2018-03-14 14:27:45 -10:00
Jack Andersen 46a4a37cc6 Initial working projectiles 2018-02-11 19:30:21 -10:00
Jack Andersen 547471c6ba Work on projectiles 2018-02-10 19:27:00 -10:00
Jack Andersen ae6797f24b Fix player dynamic collision 2018-02-07 20:18:27 -10:00
Jack Andersen 8301adc3d6 Huge compile performance refactor 2017-12-28 22:08:12 -10:00