2022-04-10 00:17:06 +00:00
|
|
|
#ifndef _COSCONTEXT_HPP
|
|
|
|
#define _COSCONTEXT_HPP
|
|
|
|
|
2022-09-20 04:35:24 +00:00
|
|
|
#include <stddef.h>
|
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
#include "types.h"
|
|
|
|
|
2022-08-30 22:48:44 +00:00
|
|
|
#include <dolphin/gx/GXStruct.h>
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
class COsContext {
|
|
|
|
public:
|
2022-09-13 04:26:54 +00:00
|
|
|
COsContext(bool, bool);
|
|
|
|
~COsContext();
|
|
|
|
|
2022-10-01 06:19:09 +00:00
|
|
|
void OpenWindow(const char* title, int x, int y, int w, int h, bool fullscreen);
|
|
|
|
|
2022-09-20 04:35:24 +00:00
|
|
|
uint GetBaseFreeRam() const {
|
|
|
|
size_t hiAddr = reinterpret_cast< size_t >(x1c_arenaHi);
|
|
|
|
size_t loAddr = reinterpret_cast< size_t >(x20_arenaLo2);
|
|
|
|
return ((hiAddr & ~31) - ((loAddr + 31) & ~31));
|
|
|
|
}
|
|
|
|
|
2022-04-10 00:17:06 +00:00
|
|
|
private:
|
|
|
|
int x0_right;
|
|
|
|
int x4_bottom;
|
|
|
|
int x8_left;
|
|
|
|
int xc_top;
|
|
|
|
int x10_format;
|
|
|
|
int x14_consoleType;
|
|
|
|
void* x18_arenaLo1;
|
|
|
|
void* x1c_arenaHi;
|
|
|
|
void* x20_arenaLo2;
|
|
|
|
void* x24_frameBuffer1;
|
|
|
|
void* x28_frameBuffer2;
|
|
|
|
int x2c_frameBufferSize;
|
|
|
|
GXRenderModeObj x30_renderMode;
|
|
|
|
};
|
2022-09-13 04:26:54 +00:00
|
|
|
CHECK_SIZEOF(COsContext, 0x6c)
|
2022-04-10 00:17:06 +00:00
|
|
|
|
|
|
|
#endif
|