- [NEW] getLocalX() i getLocalY(), per a obtindre les coordenades del ratolí en l'espai del viewport

This commit is contained in:
2023-10-06 18:54:22 +02:00
parent d185c4f20b
commit 35df2fe8db
2 changed files with 13 additions and 0 deletions

View File

@@ -187,6 +187,16 @@ namespace draw
viewport.h = destination->h;
}
const int getLocalX(const int x)
{
return x - viewport.x;
}
const int getLocalY(const int y)
{
return y - viewport.y;
}
// Estableix la paleta del sistema carregant-la d'un GIF
void loadPalette(const std::string &filename)
{