prime/include/Kyoto/CARAMToken.hpp

51 lines
942 B
C++
Raw Normal View History

#ifndef _CARAMTOKEN
#define _CARAMTOKEN
#include "types.h"
class CARAMToken {
2022-12-06 07:59:41 +00:00
static CARAMToken* sLists[7];
public:
2022-12-03 21:31:54 +00:00
enum EStatus {
kS_Zero,
kS_One,
2022-12-06 07:59:41 +00:00
kS_Two,
kS_Three,
kS_Four,
kS_Five,
kS_Six,
2022-12-03 21:31:54 +00:00
};
CARAMToken();
2022-12-06 07:59:41 +00:00
CARAMToken(void* ptr, uint len, int unk);
2022-12-03 21:31:54 +00:00
CARAMToken(const CARAMToken& other);
~CARAMToken();
void PostConstruct(void* ptr, uint len, int unk);
CARAMToken& operator=(const CARAMToken& other);
2022-12-06 07:59:41 +00:00
bool LoadToMRAM();
bool LoadToARAM();
bool RefreshStatus();
static void UpdateAllDMAs();
2022-12-03 21:31:54 +00:00
void InitiallyMoveToList();
void MoveToList(EStatus status);
void RemoveFromList();
void MakeInvalid();
2022-12-06 07:59:41 +00:00
void* sub_803583d4();
2022-12-03 21:31:54 +00:00
void sub_80358388();
void* GetMRAMSafe();
2022-12-06 07:59:41 +00:00
2022-12-03 21:31:54 +00:00
private:
2022-12-06 07:59:41 +00:00
EStatus x0_status;
void* x4_mramPtr;
const void* x8_aramPtr;
int xc_dataLen;
uint x10_dmaHandle;
CARAMToken* x14_prev;
CARAMToken* x18_next;
2022-12-03 21:31:54 +00:00
bool x1c_24_ : 1;
};
#endif // _CARAMTOKEN