aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.h
diff options
context:
space:
mode:
authorheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-03 09:28:12 +0100
committerheavydemon21 <nielsstunnebrink1@gmail.com>2024-12-03 09:28:12 +0100
commitb6609b0fbc263f4fd93791f3897c5f2840b962f2 (patch)
tree71d316d3197275d5253e4d531cddf626c2f9a503 /src/crepe/facade/SDLContext.h
parente1a6c367a7d4233ed5f38a68ee4d69c3cef1c4f5 (diff)
implemented feedback removed get_width and height --> get_size for both texture and sdlcontext
Diffstat (limited to 'src/crepe/facade/SDLContext.h')
-rw-r--r--src/crepe/facade/SDLContext.h29
1 files changed, 6 insertions, 23 deletions
diff --git a/src/crepe/facade/SDLContext.h b/src/crepe/facade/SDLContext.h
index e128bfd..e49ca78 100644
--- a/src/crepe/facade/SDLContext.h
+++ b/src/crepe/facade/SDLContext.h
@@ -12,6 +12,7 @@
#include "../api/Camera.h"
#include "../api/Sprite.h"
+#include "api/Color.h"
#include "api/Texture.h"
#include "types.h"
@@ -105,18 +106,11 @@ private:
std::unique_ptr<SDL_Texture, std::function<void(SDL_Texture *)>>
texture_from_path(const std::string & path);
/**
- * \brief Gets the width of a texture.
+ * \brief Gets the size of a texture.
* \param texture Reference to the Texture object.
- * \return Width of the texture as an integer.
+ * \return Width and height of the texture as an integer.
*/
- int get_width(const Texture & texture) const;
-
- /**
- * \brief Gets the height of a texture.
- * \param texture Reference to the Texture object.
- * \return Height of the texture as an integer.
- */
- int get_height(const Texture & texture) const;
+ ivec2 get_size(const Texture & ctx);
private:
//! Will use draw,clear_screen, present_screen, camera.
@@ -165,20 +159,9 @@ private:
* \brief Set an additional color value multiplied into render copy operations.
*
* \param texture the given texture to adjust
- * \param r Red color
- * \param g Green color
- * \param b Blue color
- */
- void set_rbg_texture(const Texture & texture, const uint8_t & r, const uint8_t & g,
- const uint8_t & b);
-
- /**
- * \brief Set an additional alpha value multiplied into render copy operations.
- *
- * \param texture modify the given texture alpha channel
- * \param alpha alpha channel
+ * \param color the color data for the texture
*/
- void set_alpha_texture(const Texture & texture, const uint8_t & alpha);
+ void set_color_texture(const Texture & texture, const Color & color);
private:
//! sdl Window