Files
tp/include/JSystem/JUtility/JUTGraphFifo.h
T
roeming c161523338 JUtility matching for debug (#3074)
* Jut cleanup work

* data section fix

* match the last of JUtility

* added more helpful comment

* Add missed null terminator

* do while -> while loop

* replace more do whiles

* Fix wii regression

* Add suggestions

* fix null check

---------

Co-authored-by: roeming <roeming@users.noreply.github.com>
2026-01-28 19:38:20 -08:00

46 lines
932 B
C++

#ifndef JUTGRAPHFIFO_H
#define JUTGRAPHFIFO_H
#include <dolphin/gx.h>
/**
* @ingroup jsystem-jutility
*
*/
class JUTGraphFifo {
public:
JUTGraphFifo(u32);
virtual ~JUTGraphFifo();
static bool* getGpStatus() {
GXGetGPStatus((GXBool*)&mGpStatus[0], (GXBool*)&mGpStatus[1], (GXBool*)&mGpStatus[2],
(GXBool*)&mGpStatus[3], (GXBool*)&mGpStatus[4]);
return mGpStatus;
}
static bool isGPActive() {
getGpStatus();
return mGpStatus[2] == false;
}
void save() {
#if !PLATFORM_SHIELD
GXSaveCPUFifo(this->mFifo);
#endif
}
static JUTGraphFifo* sCurrentFifo;
static bool mGpStatus[5];
private:
/* 0x04 */ GXFifoObj* mFifo;
/* 0x08 */ void* mBase;
/* 0x0C */ u32 mSize;
/* 0x10 */ u8 field_0x10[0xC];
};
inline JUTGraphFifo* JUTCreateFifo(u32 bufSize) { return new JUTGraphFifo(bufSize); }
#endif /* JUTGRAPHFIFO_H */