prime/include/MetroidPrime/CIOWinManager.hpp

49 lines
1.2 KiB
C++
Raw Permalink Normal View History

#ifndef _CIOWINMANAGER
#define _CIOWINMANAGER
#include "types.h"
2022-12-01 16:19:53 +00:00
#include "MetroidPrime/CArchitectureQueue.hpp"
#include "rstl/list.hpp"
#include "rstl/rc_ptr.hpp"
class CIOWin;
class CIOWinManager {
public:
2022-12-01 16:19:53 +00:00
struct IOWinPQNode {
rstl::rc_ptr<CIOWin> x0_iowin;
int x4_prio;
IOWinPQNode* x8_next;
IOWinPQNode(rstl::ncrc_ptr<CIOWin> iowin, int prio, IOWinPQNode* next);
rstl::ncrc_ptr<CIOWin> GetIOWin() const;
};
CIOWinManager();
2022-10-01 06:19:09 +00:00
~CIOWinManager();
void Draw() const;
void AddIOWin(rstl::ncrc_ptr< CIOWin >, int, int);
2022-12-01 16:19:53 +00:00
void RemoveIOWin(rstl::ncrc_ptr<CIOWin> chIow);
2022-10-01 06:19:09 +00:00
void RemoveAllIOWins();
2022-12-01 16:19:53 +00:00
void ChangeIOWinPriority(rstl::ncrc_ptr<CIOWin> toChange, int pumpPrio, int drawPrio);
rstl::ncrc_ptr<CIOWin> FindIOWin(const char* name);
void PumpMessages(CArchitectureQueue& queue);
bool DistributeOneMessage(const CArchitectureMessage& msg, CArchitectureQueue& queue);
bool OnIOWinMessage(const CArchitectureMessage& msg);
2022-10-01 06:19:09 +00:00
inline bool IsEmpty() const { return x4_pumpRoot == nullptr && x0_drawRoot == nullptr; }
private:
2022-10-01 06:19:09 +00:00
IOWinPQNode* x0_drawRoot;
IOWinPQNode* x4_pumpRoot;
CArchitectureQueue x8_localGatherQueue;
};
CHECK_SIZEOF(CIOWinManager, 0x20)
#endif // _CIOWINMANAGER