added opacity to sprite

This commit is contained in:
herbglitch 2023-09-20 02:24:15 -06:00
parent 267172908a
commit b77b09f22b
6 changed files with 31 additions and 7 deletions

View file

@ -9,6 +9,8 @@ struct ARC_Sprite {
ARC_Spritesheet *spritesheet;
ARC_Array *frames;
uint32_t *frameIndex;
//TODO: temp
uint8_t opacity;
};
#endif // !ARC_SDL

View file

@ -42,6 +42,18 @@ void ARC_Sprite_Destroy(ARC_Sprite *sprite);
*/
void ARC_Sprite_Copy(ARC_Sprite **newSprite, ARC_Sprite *oldSprite);
//TODO: temp
/**
* @brief sets ARC_Sprite's opacity
*
* @param sprite ARC_Sprite that is changing opacity
* @param opacity new opacity for ARC_Sprite
*
* @note this is temp because opacity probably should be a value
* bigger than 255
*/
void ARC_Sprite_SetOpacity(ARC_Sprite *sprite, uint8_t opacity);
/**
* @brief renders ARC_Sprite type
*