Skip to content

Commit

Permalink
ksys/ProductReporter: add PanicReason
Browse files Browse the repository at this point in the history
  • Loading branch information
leoetlino committed Apr 25, 2024
1 parent ffc35ea commit 96f611f
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion src/KingSystem/System/ProductReporter.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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();
Expand Down Expand Up @@ -96,7 +110,7 @@ class ProductReporter {
}

private:
u8 _0[8];
sead::BitFlag32 mPanicReasons;

Container mContainer1;
Container mContainer2;
Expand Down

0 comments on commit 96f611f

Please sign in to comment.