mirror of
https://github.com/AxioDL/metaforce.git
synced 2025-12-09 12:27:43 +00:00
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.
This commit is contained in:
@@ -122,6 +122,10 @@ private:
|
||||
static BooleanComparisonFunc sNullBooleanCollider;
|
||||
static MovingComparisonFunc sNullMovingCollider;
|
||||
|
||||
// Attempts to locate an entry within the collision type list that matches the supplied name.
|
||||
// Returns the end iterator in the event of no matches.
|
||||
static std::vector<Type>::const_iterator FindCollisionType(const char* name);
|
||||
|
||||
static bool InternalCollide(const CInternalCollisionStructure& collision, CCollisionInfoList& list);
|
||||
static bool InternalCollideBoolean(const CInternalCollisionStructure& collision);
|
||||
static bool InternalCollideMoving(const CInternalCollisionStructure& collision, const zeus::CVector3f& dir,
|
||||
|
||||
Reference in New Issue
Block a user