Add a way to switch backgrounds

This commit is contained in:
2026-05-28 19:12:27 +02:00
parent 82a7d76b92
commit 24ebd8a5af
7 changed files with 92 additions and 11 deletions
+5 -1
View File
@@ -17,7 +17,11 @@ void storage_init() {
}
void storage_initBackground(const char* path, TFT_eSprite& bg) {
void storage_initBackground(const int id, TFT_eSprite& bg) {
char path[15];
snprintf(path, 15, "/bg/%i.bin", id);
File file = SPIFFS.open(path, "r");
if (!file) {
printf("%s Failed to open file for reading\n", TAG_S);
+1 -1
View File
@@ -9,7 +9,7 @@
void storage_init();
void storage_readFile(const char* path, struct SpriteData* spriteData);
void storage_initBackground(const char* path, TFT_eSprite &bg);
void storage_initBackground(const int id, TFT_eSprite &bg);
void storage_saveState();
void storage_loadState();