Cleanup GPU code more
This commit is contained in:
@@ -7,22 +7,19 @@
|
||||
namespace JabyEngine {
|
||||
namespace GPU {
|
||||
namespace internal {
|
||||
struct Screen {
|
||||
static void configurate() {
|
||||
static constexpr uint16_t FirstVisiblePixelH = 0x260;
|
||||
struct Display {
|
||||
typedef ::JabyEngine::GPU::Display PublicDisplay;
|
||||
|
||||
#ifdef JABYENGINE_PAL
|
||||
static constexpr uint16_t FirstVisiblePixelV = 0xA3;
|
||||
|
||||
GPU_IO::GP1 = GPU_IO::Command::DisplayMode(GPU_IO::DisplayMode_t::PAL());
|
||||
GPU::Screen::set_offset(0, 0);
|
||||
#else
|
||||
static constexpr uint16_t FirstVisiblePixelV = 0x88;
|
||||
|
||||
GPU_IO::GP1 = GPU_IO::Command::DisplayMode(GPU_IO::DisplayMode_t::NTSC());
|
||||
GPU::Screen::set_offset(0, 5); //< Random values
|
||||
#endif
|
||||
}
|
||||
static constexpr auto Width = PublicDisplay::Width;
|
||||
static constexpr auto Height = PublicDisplay::Height;
|
||||
|
||||
#ifdef JABYENGINE_PAL
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode_t::PAL();
|
||||
static constexpr uint16_t ScanlinesV = 288;
|
||||
#else
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode_t::NTSC();
|
||||
static constexpr uint16_t ScanlinesV = 240;
|
||||
#endif //JABYENGINE_PAL
|
||||
|
||||
static void exchange_buffer_and_display();
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user