make all globals static

This commit is contained in:
Damian Schneider
2025-11-08 16:04:08 +01:00
parent 0eef321f88
commit 790be35ab8

View File

@@ -9,11 +9,11 @@
* Functions to render images from filesystem to segments, used by the "Image" effect * Functions to render images from filesystem to segments, used by the "Image" effect
*/ */
File file; static File file;
char lastFilename[34] = "/"; static char lastFilename[34] = "/";
GifDecoder<320,320,12,true> decoder; static GifDecoder<320,320,12,true> decoder;
bool gifDecodeFailed = false; static bool gifDecodeFailed = false;
unsigned long lastFrameDisplayTime = 0, currentFrameDelay = 0; static unsigned long lastFrameDisplayTime = 0, currentFrameDelay = 0;
bool fileSeekCallback(unsigned long position) { bool fileSeekCallback(unsigned long position) {
return file.seek(position); return file.seek(position);
@@ -42,10 +42,10 @@ bool openGif(const char *filename) {
return true; return true;
} }
Segment* activeSeg; static Segment* activeSeg;
uint16_t gifWidth, gifHeight; static uint16_t gifWidth, gifHeight;
int lastCoordinate; // last coordinate (x+y) that was set, used to reduce redundant pixel writes static int lastCoordinate; // last coordinate (x+y) that was set, used to reduce redundant pixel writes
uint16_t perPixelX, perPixelY; // scaling factors when upscaling static uint16_t perPixelX, perPixelY; // scaling factors when upscaling
void screenClearCallback(void) { void screenClearCallback(void) {
activeSeg->fill(0); activeSeg->fill(0);