- [CHG] draw.rect i draw.rectFill ara pillen (x,y,w,h), com les persones normals, no (x1,y1,x2,y2) com el subnormal de pico-8
This commit is contained in:
26
mini.cpp
26
mini.cpp
@@ -676,25 +676,29 @@ void vline(int x, int y0, int y1, uint8_t color) {
|
||||
vline(x, y0, y1);
|
||||
}
|
||||
|
||||
void rect(int x0, int y0, int x1, int y1) {
|
||||
hline(x0, y0, x1);
|
||||
hline(x0, y1, x1);
|
||||
vline(x0, y0, y1);
|
||||
vline(x1, y0, y1);
|
||||
void rect(int x, int y, int w, int h) {
|
||||
int x1 = w-x+1;
|
||||
int y1 = h-y+1;
|
||||
hline(x, y, x1);
|
||||
hline(x, y1, x1);
|
||||
vline(x, y, y1);
|
||||
vline(x1, y, y1);
|
||||
}
|
||||
|
||||
void rect(int x0, int y0, int x1, int y1, uint8_t color) {
|
||||
void rect(int x, int y, int w, int h, uint8_t color) {
|
||||
ds::pen_color = color;
|
||||
rect(x0, y0, x1, y1);
|
||||
rect(x, y, w, h);
|
||||
}
|
||||
|
||||
void rectfill(int x0, int y0, int x1, int y1) {
|
||||
for (int y=y0; y<=y1; ++y) hline(x0, y, x1);
|
||||
void rectfill(int x, int y, int w, int h) {
|
||||
int x1 = w-x+1;
|
||||
int y1 = h-y+1;
|
||||
for (int y=y; y<=y1; ++y) hline(x, y, x1);
|
||||
}
|
||||
|
||||
void rectfill(int x0, int y0, int x1, int y1, uint8_t color) {
|
||||
void rectfill(int x, int y, int w, int h, uint8_t color) {
|
||||
ds::pen_color = color;
|
||||
rectfill(x0, y0, x1, y1);
|
||||
rectfill(x, y, w, h);
|
||||
}
|
||||
|
||||
void fillp(uint16_t pat, bool transparent) {
|
||||
|
||||
Reference in New Issue
Block a user