mirror of
https://github.com/TwilitRealm/dusklight
synced 2026-08-08 10:03:06 -04:00
eed14acdc6
The hope of auto-importing data via lld MinGW + pseudo_reloc is now dead thanks to ARM64, so I just wrote a script to go annotate every exported data symbol in the game instead.
48 lines
998 B
C++
48 lines
998 B
C++
#ifndef JUTGRAPHFIFO_H
|
|
#define JUTGRAPHFIFO_H
|
|
|
|
#include <gx.h>
|
|
|
|
#include "JSystem/JKernel/JKRHeap.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 DUSK_GAME_DATA JUTGraphFifo* sCurrentFifo;
|
|
static DUSK_GAME_DATA bool mGpStatus[5];
|
|
|
|
private:
|
|
/* 0x04 */ GXFifoObj* mFifo;
|
|
/* 0x08 */ void* mBase;
|
|
/* 0x0C */ u32 mSize;
|
|
/* 0x10 */ u8 field_0x10[0xC];
|
|
};
|
|
|
|
inline JUTGraphFifo* JUTCreateFifo(u32 bufSize) { return JKR_NEW JUTGraphFifo(bufSize); }
|
|
|
|
#endif /* JUTGRAPHFIFO_H */
|