Integrate all the progress into master #6

Merged
jaby merged 595 commits from ToolBox into main 2025-01-01 13:17:44 +00:00
3 changed files with 10 additions and 8 deletions
Showing only changes of commit 16cfcf42b2 - Show all commits

View File

@ -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() {

View File

@ -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();

View File

@ -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));