mirror of https://github.com/PrimeDecomp/prime.git
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…
Reference in New Issue