Improve struct and namespace usage
This commit is contained in:
@@ -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__
|
Reference in New Issue
Block a user