CBooRenderer: Make Buckets class mostly internal

This is only ever functionally used within this translation unit, so we
can hide the class internally.
This commit is contained in:
Lioncash 2020-03-06 01:13:41 -05:00
parent 2f9dd38bbe
commit 4f7f5cf09a
2 changed files with 22 additions and 28 deletions

View File

@ -35,13 +35,27 @@ static rstl::reserved_vector<rstl::reserved_vector<CDrawable*, 128>, 50> sBucket
static rstl::reserved_vector<CDrawablePlaneObject, 8> sPlaneObjectDataHolder; static rstl::reserved_vector<CDrawablePlaneObject, 8> sPlaneObjectDataHolder;
static rstl::reserved_vector<u16, 8> sPlaneObjectBucketHolder; static rstl::reserved_vector<u16, 8> sPlaneObjectBucketHolder;
rstl::reserved_vector<u16, 50> Buckets::sBucketIndex; class Buckets {
rstl::reserved_vector<CDrawable, 512>* Buckets::sData = nullptr; friend class CBooRenderer;
rstl::reserved_vector<rstl::reserved_vector<CDrawable*, 128>, 50>* Buckets::sBuckets = nullptr;
rstl::reserved_vector<CDrawablePlaneObject, 8>* Buckets::sPlaneObjectData = nullptr; static inline rstl::reserved_vector<u16, 50> sBucketIndex;
rstl::reserved_vector<u16, 8>* Buckets::sPlaneObjectBucket = nullptr; static inline rstl::reserved_vector<CDrawable, 512>* sData = nullptr;
const float Buckets::skWorstMinMaxDistance[2] = {99999.f, -99999.f}; static inline rstl::reserved_vector<rstl::reserved_vector<CDrawable*, 128>, 50>* sBuckets = nullptr;
float Buckets::sMinMaxDistance[2]; static inline rstl::reserved_vector<CDrawablePlaneObject, 8>* sPlaneObjectData = nullptr;
static inline rstl::reserved_vector<u16, 8>* sPlaneObjectBucket = nullptr;
static constexpr float skWorstMinMaxDistance[2] = {99999.0f, -99999.0f};
static inline float sMinMaxDistance[2] = {0.0f, 0.0f};
public:
static void Clear();
static void Sort();
static void InsertPlaneObject(float closeDist, float farDist, const zeus::CAABox& aabb, bool invertTest,
const zeus::CPlane& plane, bool zOnly, EDrawableType dtype, const void* data);
static void Insert(const zeus::CVector3f& pos, const zeus::CAABox& aabb, EDrawableType dtype, const void* data,
const zeus::CPlane& plane, u16 extraSort);
static void Shutdown();
static void Init();
};
void Buckets::Clear() { void Buckets::Clear() {
sData->clear(); sData->clear();

View File

@ -38,27 +38,7 @@ class CTexture;
class IFactory; class IFactory;
class IObjectStore; class IObjectStore;
class Buckets { class Buckets;
friend class CBooRenderer;
static rstl::reserved_vector<u16, 50> sBucketIndex;
static rstl::reserved_vector<CDrawable, 512>* sData;
static rstl::reserved_vector<rstl::reserved_vector<CDrawable*, 128>, 50>* sBuckets;
static rstl::reserved_vector<CDrawablePlaneObject, 8>* sPlaneObjectData;
static rstl::reserved_vector<u16, 8>* sPlaneObjectBucket;
static const float skWorstMinMaxDistance[2];
static float sMinMaxDistance[2];
public:
static void Clear();
static void Sort();
static void InsertPlaneObject(float closeDist, float farDist, const zeus::CAABox& aabb, bool invertTest,
const zeus::CPlane& plane, bool zOnly, EDrawableType dtype, const void* data);
static void Insert(const zeus::CVector3f& pos, const zeus::CAABox& aabb, EDrawableType dtype, const void* data,
const zeus::CPlane& plane, u16 extraSort);
static void Shutdown();
static void Init();
};
enum class EWorldShadowMode { enum class EWorldShadowMode {
None, None,