mirror of
https://github.com/PrimeDecomp/prime.git
synced 2025-05-13 13:11:20 +00:00
Match and link CMaterialFilter/List
Former-commit-id: 480e975add42d7f45db55f5b961a76ed1094a9ee
This commit is contained in:
parent
1d574dea1c
commit
54e2e23a86
@ -29,6 +29,7 @@ COMPLETE_OBJECTS = [
|
||||
"MetroidPrime/ScriptObjects/CScriptDebugCameraWaypoint",
|
||||
"Weapons/IWeaponRenderer",
|
||||
"Collision/CMaterialList",
|
||||
"Collision/CMaterialFilter",
|
||||
"Collision/CMRay",
|
||||
"Kyoto/Basics/CStopwatch",
|
||||
"Kyoto/Basics/COsContextDolphin",
|
||||
|
@ -118,8 +118,8 @@ public:
|
||||
// Intersection__13CMaterialListCFRC13CMaterialList weak
|
||||
static s32 BitPosition(u64 flags);
|
||||
// GetMaterialString__13CMaterialListCFv weak
|
||||
u64 SharesMaterials(const CMaterialList& other) const {
|
||||
return (other.value & value);
|
||||
bool SharesMaterials(const CMaterialList& other) const {
|
||||
return (other.value & value) ? true : false;
|
||||
}
|
||||
|
||||
private:
|
||||
|
@ -410,10 +410,10 @@ COLLISION :=\
|
||||
$(BUILD_DIR)/asm/Collision/CCollisionInfo.o\
|
||||
$(BUILD_DIR)/asm/Collision/InternalColliders.o\
|
||||
$(BUILD_DIR)/asm/Collision/CCollisionPrimitive.o\
|
||||
$(BUILD_DIR)/asm/Collision/CMaterialList.o\
|
||||
$(BUILD_DIR)/src/Collision/CMaterialList.o\
|
||||
$(BUILD_DIR)/asm/Collision/CollisionUtil.o\
|
||||
$(BUILD_DIR)/asm/Collision/CCollidableSphere.o\
|
||||
$(BUILD_DIR)/asm/Collision/CMaterialFilter.o\
|
||||
$(BUILD_DIR)/src/Collision/CMaterialFilter.o\
|
||||
$(BUILD_DIR)/asm/Collision/COBBox.o\
|
||||
$(BUILD_DIR)/src/Collision/CMRay.o\
|
||||
|
||||
|
@ -7,18 +7,11 @@ bool CMaterialFilter::Passes(const CMaterialList& other) const {
|
||||
case kFT_Always:
|
||||
return true;
|
||||
case kFT_Include:
|
||||
return other.SharesMaterials(include) != 0 ? true : false;
|
||||
return other.SharesMaterials(include);
|
||||
case kFT_Exclude:
|
||||
return other.SharesMaterials(exclude) == 0;
|
||||
case kFT_IncludeExclude: {
|
||||
bool ret = false;
|
||||
if (other.SharesMaterials(include) != 0) {
|
||||
if (other.SharesMaterials(exclude) == 0) {
|
||||
ret = true;
|
||||
}
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
return !other.SharesMaterials(exclude);
|
||||
case kFT_IncludeExclude:
|
||||
return other.SharesMaterials(include) && !other.SharesMaterials(exclude);
|
||||
default:
|
||||
return true;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user