Improve struct and namespace usage

This commit is contained in:
2023-01-08 21:08:23 +01:00
parent 297526e4d0
commit a791f0bffd
14 changed files with 169 additions and 177 deletions

View File

@@ -12,7 +12,7 @@
namespace JabyEngine {
namespace GPU {
namespace Display {
struct Display {
#ifdef JABYENGINE_PAL
static constexpr size_t Width = 320;
static constexpr size_t Height = 256;
@@ -22,21 +22,19 @@ namespace JabyEngine {
#endif
static void enable() {
GP1.write(Command::GP1::SetDisplayState(DisplayState::On));
GPU_IO::GP1.write(GPU_IO::Command::GP1::SetDisplayState(GPU_IO::DisplayState::On));
}
static void disable() {
GP1.write(Command::GP1::SetDisplayState(DisplayState::Off));
GPU_IO::GP1.write(GPU_IO::Command::GP1::SetDisplayState(GPU_IO::DisplayState::Off));
}
}
};
namespace Screen {
extern uint8_t CurrentDisplayAreaID;
struct Screen {
static uint8_t CurrentDisplayAreaID;
namespace Range {
void set_offset(uint16_t x, uint16_t y);
}
}
static void set_offset(uint16_t x, uint16_t y);
};
}
}
#endif //!__JABYENGINE_GPU_HPP__