- [CHG] surf.target() i surf.source() sense paràmetres ara el que fan es tornar les surfaces actuals de target i de source

This commit is contained in:
2026-02-24 22:18:54 +01:00
parent fc962b4e18
commit a17a1bb517
5 changed files with 27 additions and 5 deletions

View File

@@ -359,6 +359,18 @@ void setmap(uint8_t surface) {
map_surface = &surfaces[surface];
}
uint8_t getdest()
{
for (unsigned int i=0; i<MAX_SURFACES; ++i) if (dest_surface == &surfaces[i]) return i;
return 0;
}
uint8_t getsource()
{
for (unsigned int i=0; i<MAX_SURFACES; ++i) if (source_surface == &surfaces[i]) return i;
return 0;
}
uint8_t getmap()
{
for (unsigned int i=0; i<MAX_SURFACES; ++i) if (map_surface == &surfaces[i]) return i;