From e96ff9bdb51e9f075f7e97825c1fd8d8d53be4c6 Mon Sep 17 00:00:00 2001 From: Luke Street Date: Wed, 19 Oct 2022 00:11:57 -0400 Subject: [PATCH] Link CAABoxFilter Former-commit-id: 2883468211cf73e00f4644dafcaaeb308b8d4f16 --- configure.py | 2 +- include/Collision/CCollisionInfoList.hpp | 8 ++++---- include/rstl/reserved_vector.hpp | 6 ++++-- obj_files.mk | 2 +- src/MetroidPrime/CAABoxFilter.cpp | 4 ++-- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/configure.py b/configure.py index e2e9eb27..2702750b 100755 --- a/configure.py +++ b/configure.py @@ -241,7 +241,7 @@ LIBS = [ "MetroidPrime/Player/CPlayerOrbit", "MetroidPrime/CGameCollision", ["MetroidPrime/CBallFilter", True], - ["MetroidPrime/CAABoxFilter", False], + ["MetroidPrime/CAABoxFilter", True], "MetroidPrime/CGroundMovement", "MetroidPrime/Enemies/CNewIntroBoss", "MetroidPrime/Weapons/CPhazonBeam", diff --git a/include/Collision/CCollisionInfoList.hpp b/include/Collision/CCollisionInfoList.hpp index aedc4bb4..98ee7d9a 100644 --- a/include/Collision/CCollisionInfoList.hpp +++ b/include/Collision/CCollisionInfoList.hpp @@ -21,10 +21,10 @@ public: x0_list.push_back(info.GetSwapped()); } - iterator end() { return x0_list.end(); } - const_iterator end() const { return x0_list.end(); } - iterator begin() { return x0_list.begin(); } - const_iterator begin() const { return x0_list.begin(); } + iterator End() { return x0_list.end(); } + const_iterator End() const { return x0_list.end(); } + iterator Begin() { return x0_list.begin(); } + const_iterator Begin() const { return x0_list.begin(); } }; #endif // _CCOLLISIONINFOLIST diff --git a/include/rstl/reserved_vector.hpp b/include/rstl/reserved_vector.hpp index 5f1f3bad..736098df 100644 --- a/include/rstl/reserved_vector.hpp +++ b/include/rstl/reserved_vector.hpp @@ -13,8 +13,10 @@ class reserved_vector { uchar x4_data[N * sizeof(T)]; public: - typedef pointer_iterator< T, reserved_vector< T, N >, void > iterator; - typedef const_pointer_iterator< T, reserved_vector< T, N >, void > const_iterator; + // typedef pointer_iterator< T, reserved_vector< T, N >, void > iterator; + // typedef const_pointer_iterator< T, reserved_vector< T, N >, void > const_iterator; + typedef T* iterator; + typedef const T* const_iterator; inline iterator begin() { return iterator(data()); } inline const_iterator begin() const { return const_iterator(data()); } diff --git a/obj_files.mk b/obj_files.mk index b3998434..69af78c7 100644 --- a/obj_files.mk +++ b/obj_files.mk @@ -208,7 +208,7 @@ METROIDPRIME :=\ $(BUILD_DIR)/asm/MetroidPrime/Player/CPlayerOrbit.o\ $(BUILD_DIR)/asm/MetroidPrime/CGameCollision.o\ $(BUILD_DIR)/src/MetroidPrime/CBallFilter.o\ - $(BUILD_DIR)/asm/MetroidPrime/CAABoxFilter.o\ + $(BUILD_DIR)/src/MetroidPrime/CAABoxFilter.o\ $(BUILD_DIR)/asm/MetroidPrime/CGroundMovement.o\ $(BUILD_DIR)/asm/MetroidPrime/Enemies/CNewIntroBoss.o\ $(BUILD_DIR)/asm/MetroidPrime/Weapons/CPhazonBeam.o\ diff --git a/src/MetroidPrime/CAABoxFilter.cpp b/src/MetroidPrime/CAABoxFilter.cpp index 2da80a5a..073def0b 100644 --- a/src/MetroidPrime/CAABoxFilter.cpp +++ b/src/MetroidPrime/CAABoxFilter.cpp @@ -6,14 +6,14 @@ void CAABoxFilter::FilterBoxFloorCollisions(const CCollisionInfoList& in, CCollisionInfoList& out) { float minZ = 10000.f; - for (CCollisionInfoList::const_iterator it = in.begin(); it != in.end(); ++it) { + for (CCollisionInfoList::const_iterator it = in.Begin(); it != in.End(); ++it) { if (it->GetMaterialLeft().HasMaterial(kMT_Wall) && it->GetPoint().GetZ() < minZ) { minZ = it->GetPoint().GetZ(); } } CCollisionInfoList temp; - for (CCollisionInfoList::const_iterator it = in.begin(); it != in.end(); ++it) { + for (CCollisionInfoList::const_iterator it = in.Begin(); it != in.End(); ++it) { if (it->GetMaterialLeft().HasMaterial(kMT_Floor)) { if (it->GetPoint().GetZ() < minZ) { temp.Add(*it, false);