Initial commit

This commit is contained in:
Nacho
2025-05-24 15:14:47 +02:00
parent 043c4640d0
commit c0e829e4ca
56 changed files with 2611 additions and 1 deletions
+19
View File
@@ -0,0 +1,19 @@
#include "draw.h"
const char* TAG_DB = "[DRAW BG]";
void draw_drawBackground(TFT_eSprite &buffer, TFT_eSprite &bg, int spr_w, int spr_h, int factor) {
int scaledWidth = spr_w * factor;
int scaledHeight = spr_h * factor;
for (int sy = 0; sy < scaledHeight; sy++) {
for (int sx = 0; sx < scaledWidth; sx++) {
int srcX = sx / factor;
int srcY = sy / factor;
uint16_t color = bg.readPixel(srcX, srcY);
buffer.drawPixel(sx, sy, color);
}
}
}