diff options
Diffstat (limited to 'agbx/source/gfx/plot.c')
-rw-r--r-- | agbx/source/gfx/plot.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/agbx/source/gfx/plot.c b/agbx/source/gfx/plot.c index 2146c54..cc41d38 100644 --- a/agbx/source/gfx/plot.c +++ b/agbx/source/gfx/plot.c @@ -13,7 +13,7 @@ agbx_i10 agbx_plot3(agbx_i8 const _x,agbx_i8 const _y,agbx_i10 const _col) { if (_x >= 0xF0u || _y >= 0xA0u) {agbx_done(agbx_err_pos2big);} #endif agbx_i10 const px = _y * 0xF0u + _x; - __agbx_setpx2(px,_col) + __agbx_setpx2(0x600'0000u,px,_col) return px; } @@ -21,8 +21,9 @@ agbx_i10 agbx_plot4(agbx_i8 const _x,agbx_i8 const _y,agbx_i8 const _col) { #if defined(__agbx_dbg) if (_x >= 0xF0u || _y >= 0xA0u) {agbx_done(agbx_err_pos2big);} #endif + agbx_i20 const vaddr = 0x600'0000u + (agbx_get10(0x400'0000u) >> 0x4u & 0x1u) * 0xA000u; agbx_i10 const px = _y * 0xF0u + _x; - __agbx_setpx1(px,_col) + agbx_setpx1(vaddr,px,_col); return px; } @@ -30,7 +31,8 @@ agbx_i10 agbx_plot5(agbx_i8 const _x,agbx_i8 const _y,agbx_i10 const _col) { #if defined(__agbx_dbg) if (_x >= 0xA0u || _y >= 0x80u) {agbx_done(agbx_err_pos2big);} #endif - agbx_i10 const px = _y * 0xA0u + _x; - __agbx_setpx2(px,_col) + agbx_i20 const vaddr = 0x600'0000u + (agbx_get10(0x400'0000u) >> 0x4u & 0x1u) * 0xA000u; + agbx_i10 const px = _y * 0xF0u + _x; + __agbx_setpx2(vaddr,px,_col) return px; } |