mirror of
https://github.com/nacabaro/nacapet.git
synced 2026-10-01 15:41:37 +00:00
Add a way to switch backgrounds
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user