mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-08-10 07:30:08 -04:00
Savestate ! RDS (only PSN) tx
This commit is contained in:
parent
14ada9e132
commit
8e0210f944
24 changed files with 459 additions and 45 deletions
|
@ -28,6 +28,8 @@ using namespace portapack;
|
|||
|
||||
#include "ch.h"
|
||||
|
||||
#include <complex>
|
||||
|
||||
namespace lcd {
|
||||
|
||||
namespace {
|
||||
|
@ -239,6 +241,25 @@ void ILI9341::fill_rectangle(ui::Rect r, const ui::Color c) {
|
|||
}
|
||||
}
|
||||
|
||||
void ILI9341::draw_line(const ui::Point start, const ui::Point end, const ui::Color color) {
|
||||
int x0 = start.x;
|
||||
int y0 = start.y;
|
||||
int x1 = end.x;
|
||||
int y1 = end.y;
|
||||
|
||||
int dx = std::abs(x1-x0), sx = x0<x1 ? 1 : -1;
|
||||
int dy = std::abs(y1-y0), sy = y0<y1 ? 1 : -1;
|
||||
int err = (dx>dy ? dx : -dy)/2, e2;
|
||||
|
||||
for(;;){
|
||||
draw_pixel({static_cast<ui::Coord>(x0), static_cast<ui::Coord>(y0)}, color);
|
||||
if (x0==x1 && y0==y1) break;
|
||||
e2 = err;
|
||||
if (e2 >-dx) { err -= dy; x0 += sx; }
|
||||
if (e2 < dy) { err += dx; y0 += sy; }
|
||||
}
|
||||
}
|
||||
|
||||
void ILI9341::fill_circle(
|
||||
const ui::Point center,
|
||||
const ui::Dim radius,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue