Still working on the BIG FUCKING CONVERSION...

This commit is contained in:
2021-05-10 18:53:31 +02:00
parent 717c5715e9
commit 2ad5241005
21 changed files with 134 additions and 143 deletions

View File

@@ -816,3 +816,40 @@ void ArounderProcesor::put_pixel( int x, int y, Uint32 pixel )
{
pixels[ ( y * mapa->w ) + x ] = pixel;
}
/*
#define COLOR 0xFFFFFFFF;
void vline(const int x, const int y1, const int y2) {
if (x < 0 || x > 319) return;
const int yy1 = y1 < 0 ? 0 : y1 > 239 ? 239 : y1;
const int yy2 = y2 < 0 ? 0 : y2 > 239 ? 239 : y2;
for (int y=yy1;y<=yy2;y++) pixels[x+y*pitch] = COLOR;
}
void hline(const int x1, const int x2, const int y) {
if (y < 0 || y > 239) return;
const int yy = y*pitch;
const int xx1 = x1 < 0 ? 0 : x1 > 319 ? 319 : x1;
const int xx2 = x2 < 0 ? 0 : x2 > 319 ? 319 : x2;
for (int x=xx1;x<=xx2;x++) pixels[x+yy] = COLOR;
}
void circle(const int x, const int y) {
hline(x+9, x+9+7, y+0); hline(x+9, x+9+7, y+24);
hline(x+7, x+7+11, y+1); hline(x+7, x+7+11, y+23);
hline(x+5, x+5+15, y+2); hline(x+5, x+5+15, y+22);
hline(x+4, x+4+17, y+3); hline(x+4, x+4+17, y+21);
hline(x+3, x+3+19, y+4); hline(x+3, x+3+19, y+20);
hline(x+2, x+2+21, y+5); hline(x+2, x+2+21, y+19);
hline(x+2, x+2+21, y+6); hline(x+2, x+2+21, y+18);
hline(x+1, x+1+23, y+7); hline(x+1, x+1+23, y+17);
hline(x+1, x+1+23, y+8); hline(x+1, x+1+23, y+16);
hline(x, x+25, y+9); hline(x, x+25, y+15);
hline(x, x+25, y+10); hline(x, x+25, y+14);
hline(x, x+25, y+11); hline(x, x+25, y+13);
hline(x, x+25, y+12);
}
*/