mirror of https://github.com/PrimeDecomp/prime.git
Match and link CBallFilter
This commit is contained in:
parent
a859570ce0
commit
5dc8a60233
|
@ -240,7 +240,7 @@ LIBS = [
|
||||||
"MetroidPrime/Weapons/CPlasmaProjectile",
|
"MetroidPrime/Weapons/CPlasmaProjectile",
|
||||||
"MetroidPrime/Player/CPlayerOrbit",
|
"MetroidPrime/Player/CPlayerOrbit",
|
||||||
"MetroidPrime/CGameCollision",
|
"MetroidPrime/CGameCollision",
|
||||||
"MetroidPrime/CBallFilter",
|
["MetroidPrime/CBallFilter", True],
|
||||||
"MetroidPrime/CAABoxFilter",
|
"MetroidPrime/CAABoxFilter",
|
||||||
"MetroidPrime/CGroundMovement",
|
"MetroidPrime/CGroundMovement",
|
||||||
"MetroidPrime/Enemies/CNewIntroBoss",
|
"MetroidPrime/Enemies/CNewIntroBoss",
|
||||||
|
|
|
@ -0,0 +1,12 @@
|
||||||
|
#ifndef _COLLISIONUTIL
|
||||||
|
#define _COLLISIONUTIL
|
||||||
|
|
||||||
|
class CCollisionInfoList;
|
||||||
|
|
||||||
|
namespace CollisionUtil {
|
||||||
|
|
||||||
|
void AddAverageToFront(const CCollisionInfoList& in, CCollisionInfoList& out);
|
||||||
|
|
||||||
|
} // namespace CollisionUtil
|
||||||
|
|
||||||
|
#endif // _COLLISIONUTIL
|
|
@ -0,0 +1,15 @@
|
||||||
|
#ifndef _CBALLFILTER
|
||||||
|
#define _CBALLFILTER
|
||||||
|
|
||||||
|
#include "MetroidPrime/ICollisionFilter.hpp"
|
||||||
|
|
||||||
|
class CCollisionInfoList;
|
||||||
|
class CPhysicsActor;
|
||||||
|
|
||||||
|
class CBallFilter : public ICollisionFilter {
|
||||||
|
public:
|
||||||
|
explicit CBallFilter(CActor& actor) : ICollisionFilter(actor) {}
|
||||||
|
void Filter(const CCollisionInfoList& in, CCollisionInfoList& out) const;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _CBALLFILTER
|
|
@ -0,0 +1,18 @@
|
||||||
|
#ifndef _ICOLLISIONFILTER
|
||||||
|
#define _ICOLLISIONFILTER
|
||||||
|
|
||||||
|
class CActor;
|
||||||
|
class CCollisionInfoList;
|
||||||
|
|
||||||
|
class ICollisionFilter {
|
||||||
|
CActor& x4_actor;
|
||||||
|
|
||||||
|
protected:
|
||||||
|
explicit ICollisionFilter(CActor& actor) : x4_actor(actor) {}
|
||||||
|
|
||||||
|
public:
|
||||||
|
virtual ~ICollisionFilter() {};
|
||||||
|
virtual void Filter(const CCollisionInfoList& in, CCollisionInfoList& out) const = 0;
|
||||||
|
};
|
||||||
|
|
||||||
|
#endif // _ICOLLISIONFILTER
|
|
@ -207,7 +207,7 @@ METROIDPRIME :=\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Weapons/CPlasmaProjectile.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Weapons/CPlasmaProjectile.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Player/CPlayerOrbit.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Player/CPlayerOrbit.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/CGameCollision.o\
|
$(BUILD_DIR)/asm/MetroidPrime/CGameCollision.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/CBallFilter.o\
|
$(BUILD_DIR)/src/MetroidPrime/CBallFilter.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/CAABoxFilter.o\
|
$(BUILD_DIR)/asm/MetroidPrime/CAABoxFilter.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/CGroundMovement.o\
|
$(BUILD_DIR)/asm/MetroidPrime/CGroundMovement.o\
|
||||||
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CNewIntroBoss.o\
|
$(BUILD_DIR)/asm/MetroidPrime/Enemies/CNewIntroBoss.o\
|
||||||
|
|
|
@ -0,0 +1,7 @@
|
||||||
|
#include "MetroidPrime/CBallFilter.hpp"
|
||||||
|
|
||||||
|
#include "Collision/CollisionUtil.hpp"
|
||||||
|
|
||||||
|
void CBallFilter::Filter(const CCollisionInfoList& in, CCollisionInfoList& out) const {
|
||||||
|
CollisionUtil::AddAverageToFront(in, out);
|
||||||
|
}
|
Loading…
Reference in New Issue