2018-09-24 10:43:20 +02:00
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
#include <coreinit/screen.h>
|
2018-09-24 10:43:20 +02:00
|
|
|
#include <cstdint>
|
|
|
|
|
|
|
|
class Screen {
|
2022-02-08 14:44:53 +01:00
|
|
|
public:
|
|
|
|
Screen();
|
|
|
|
~Screen();
|
|
|
|
|
|
|
|
void init();
|
|
|
|
void clear(uint32_t color);
|
|
|
|
void drawRect(int x1, int y1, int x2, int y2, uint32_t color);
|
|
|
|
void fillRect(int x1, int y1, int x2, int y2, uint32_t color);
|
2022-02-08 14:48:41 +01:00
|
|
|
static void drawText(int x, int y, const char *text);
|
|
|
|
static void flip();
|
2022-02-08 14:44:53 +01:00
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
static void clear(OSScreenID screen, uint32_t color);
|
|
|
|
static void drawRect(OSScreenID screen, int x1, int y1, int x2, int y2, uint32_t color);
|
|
|
|
static void fillRect(OSScreenID screen, int x1, int y1, int x2, int y2, uint32_t color);
|
|
|
|
static void drawText(OSScreenID screen, int x, int y, const char *text);
|
|
|
|
static void flip(OSScreenID screen);
|
2022-02-08 14:44:53 +01:00
|
|
|
|
2022-07-26 19:29:41 +02:00
|
|
|
void destroyBuffer();
|
|
|
|
|
2022-02-08 14:44:53 +01:00
|
|
|
private:
|
|
|
|
void *screenBuffer;
|
|
|
|
|
2022-02-08 14:48:41 +01:00
|
|
|
static int convx(int x);
|
|
|
|
static int convy(int y);
|
2018-09-24 10:43:20 +02:00
|
|
|
};
|