mirror of
https://github.com/nacabaro/nacapet.git
synced 2026-10-01 23:51:38 +00:00
Que acaba de ocurrir?
Ah si, se ha cambiado el buffer, ocupaba todo el espacio contiguo disponible y no podía aprovecharlo para nada mas. Normal que no te dejara reservar un buffer de 240x240... Y menos ahora cuando has metido el light sleep. Ah si, ahora hay light sleep, el micro baja hasta 4mA, lo cual lo considero suficiente para mi causa...
This commit is contained in:
@@ -1,9 +1,10 @@
|
||||
#include "draw.h"
|
||||
#include "defs/screen_defs.h"
|
||||
|
||||
const char* TAG_DB = "[DRAW BG]";
|
||||
|
||||
|
||||
void draw_drawBackground(TFT_eSprite &buffer, TFT_eSprite &bg, int spr_w, int spr_h, int factor) {
|
||||
void draw_drawBackground(TFT_eSprite &bg, int spr_w, int spr_h, int factor) {
|
||||
int scaledWidth = spr_w * factor;
|
||||
int scaledHeight = spr_h * factor;
|
||||
|
||||
@@ -13,7 +14,9 @@ void draw_drawBackground(TFT_eSprite &buffer, TFT_eSprite &bg, int spr_w, int sp
|
||||
int srcY = sy / factor;
|
||||
|
||||
uint16_t color = bg.readPixel(srcX, srcY);
|
||||
buffer.drawPixel(sx, sy, color);
|
||||
|
||||
composite1.drawPixel(sx, sy, color);
|
||||
composite2.drawPixel(sx, sy - 120, color);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user