forked from jaildesigner-jailgames/jaildoctors_dilemma
- Añadido getEntry(r,g,b) a systempalette
This commit is contained in:
@@ -41,6 +41,12 @@ namespace SystemPalette
|
|||||||
return numEntries++;
|
return numEntries++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Versión de getEntry para obtener el color con los componentes R, G y B
|
||||||
|
uint8_t getEntry(const uint8_t r, const uint8_t g, const uint8_t b)
|
||||||
|
{
|
||||||
|
return getEntry( (r<<24) + (g<<16) + (b<<8) + 255 );
|
||||||
|
}
|
||||||
|
|
||||||
// Dado un índice, devolvemos su color
|
// Dado un índice, devolvemos su color
|
||||||
uint32_t getRGBA(const uint8_t entry)
|
uint32_t getRGBA(const uint8_t entry)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -9,6 +9,9 @@ namespace SystemPalette
|
|||||||
// Obtenemos el índice de la paleta para el color especificado. Si no existe se crea.
|
// Obtenemos el índice de la paleta para el color especificado. Si no existe se crea.
|
||||||
uint8_t getEntry(const uint32_t color);
|
uint8_t getEntry(const uint32_t color);
|
||||||
|
|
||||||
|
// Versión de getEntry para obtener el color con los componentes R, G y B
|
||||||
|
uint8_t getEntry(const uint8_t r, const uint8_t g, const uint8_t b);
|
||||||
|
|
||||||
// Dado un índice, devolvemos su color
|
// Dado un índice, devolvemos su color
|
||||||
uint32_t getRGBA(const uint8_t entry);
|
uint32_t getRGBA(const uint8_t entry);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user