From 96f611fa5d1c2704d91e5c490662ec8c0a741279 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?L=C3=A9o=20Lam?= Date: Thu, 25 Apr 2024 01:10:05 +0100 Subject: [PATCH] ksys/ProductReporter: add PanicReason --- src/KingSystem/System/ProductReporter.h | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/src/KingSystem/System/ProductReporter.h b/src/KingSystem/System/ProductReporter.h index 34b8b94d2..832a040c8 100644 --- a/src/KingSystem/System/ProductReporter.h +++ b/src/KingSystem/System/ProductReporter.h @@ -36,6 +36,16 @@ class PlayerTrackReporter { u8 _3a[5]; }; +enum class PanicReason { + OverlayArenaFull = 0, + HavokMainHeapFull = 1, + ActorCreateHeapFull = 2, + ResourceSHeapFull = 3, + ResourceLHeapFull = 4, + AudioHeapFull = 5, + TextureHandleMgrSlow = 6, +}; + class ProductReporter { public: ProductReporter() = default; @@ -48,6 +58,10 @@ class ProductReporter { static bool getSomeBool(); bool isEnabled() const; + sead::BitFlag32 getPanicReasons() const { return mPanicReasons; } + void addPanicReason(PanicReason reason) { mPanicReasons.setBit(int(reason)); } + void clearPanicReason() { mPanicReasons.makeAllZero(); } + s32 getRomWorkTime() const; s32 getSceneWorkTime() const; void resetSceneWorkTime(); @@ -96,7 +110,7 @@ class ProductReporter { } private: - u8 _0[8]; + sead::BitFlag32 mPanicReasons; Container mContainer1; Container mContainer2;