Mark texture state getters const

This commit is contained in:
Charles Dang 2024-08-18 00:54:54 -04:00
parent 9d35d56b8b
commit 3dc19a9808
2 changed files with 6 additions and 6 deletions

View file

@ -155,7 +155,7 @@ void texture::set_alpha_mod(uint8_t alpha)
}
}
uint8_t texture::get_alpha_mod()
uint8_t texture::get_alpha_mod() const
{
if (!texture_) {
return 0;
@ -178,7 +178,7 @@ void texture::set_color_mod(uint8_t r, uint8_t g, uint8_t b)
}
}
color_t texture::get_color_mod()
color_t texture::get_color_mod() const
{
if (!texture_) {
return {0,0,0};
@ -195,7 +195,7 @@ void texture::set_blend_mode(SDL_BlendMode b)
}
}
SDL_BlendMode texture::get_blend_mode()
SDL_BlendMode texture::get_blend_mode() const
{
if (!texture_) {
return SDL_BLENDMODE_NONE;

View file

@ -173,16 +173,16 @@ public:
/** Alpha modifier. Multiplies alpha when drawing. */
void set_alpha_mod(uint8_t alpha);
uint8_t get_alpha_mod();
uint8_t get_alpha_mod() const;
/** Blend mode. Modifies how draw operations are applied. */
void set_blend_mode(SDL_BlendMode);
SDL_BlendMode get_blend_mode();
SDL_BlendMode get_blend_mode() const;
/** Colour modifier. Multiplies each colour component when drawing. */
void set_color_mod(uint8_t r, uint8_t g, uint8_t b);
void set_color_mod(color_t);
color_t get_color_mod();
color_t get_color_mod() const;
/** Releases ownership of the managed texture and resets the ptr to null. */
void reset();