Integrate all the progress into master #6
|
@ -39,7 +39,7 @@ namespace JabyEngine {
|
|||
GPU_IO::GP1.write(GPU_IO::Command::SetDisplayState(GPU_IO::DisplayState::Off));
|
||||
}
|
||||
|
||||
static void set_offset(uint16_t x, uint16_t y);
|
||||
static void set_offset(int16_t x, int16_t y);
|
||||
};
|
||||
|
||||
static uint32_t update_id() {
|
||||
|
|
|
@ -13,11 +13,13 @@ namespace JabyEngine {
|
|||
static constexpr auto Height = PublicDisplay::Height;
|
||||
|
||||
#ifdef JABYENGINE_PAL
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode::PAL();
|
||||
static constexpr uint16_t ScanlinesV = 288;
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode::PAL();
|
||||
static constexpr uint16_t ScanlinesV = 288;
|
||||
static constexpr auto DisplayRange = PositionI16::create(78, 35);
|
||||
#else
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode::NTSC();
|
||||
static constexpr uint16_t ScanlinesV = 240;
|
||||
static constexpr auto DisplayMode = GPU_IO::DisplayMode::NTSC();
|
||||
static constexpr uint16_t ScanlinesV = 240;
|
||||
static constexpr auto DisplayRange = PositionI16::create(76, 16);
|
||||
#endif //JABYENGINE_PAL
|
||||
|
||||
static uint32_t exchange_buffer_and_display();
|
||||
|
|
|
@ -73,9 +73,9 @@ namespace JabyEngine {
|
|||
}
|
||||
}
|
||||
|
||||
void Display :: set_offset(uint16_t x, uint16_t y) {
|
||||
x += 78;
|
||||
y += 35;
|
||||
void Display :: set_offset(int16_t x, int16_t y) {
|
||||
x += internal::Display::DisplayRange.x;
|
||||
y += internal::Display::DisplayRange.y;
|
||||
|
||||
GPU_IO::GP1.write(GPU_IO::Command::HorizontalDisplayRange((x << 3), (x + Display::Width) << 3));
|
||||
GPU_IO::GP1.write(GPU_IO::Command::VerticalDisplayRange(y, y + Display::Height));
|
||||
|
|
Loading…
Reference in New Issue