aboutsummaryrefslogtreecommitdiff
path: root/mwe/resource-manager/TextureMap.cpp
diff options
context:
space:
mode:
authorJAROWMR <jarorutjes07@gmail.com>2024-11-19 20:49:09 +0100
committerJAROWMR <jarorutjes07@gmail.com>2024-11-19 20:49:09 +0100
commit0f9f379a4dec7ad9d1dce30af5e2259931692c5f (patch)
treed84a76559d99fd6a3541d0087538564d79e39470 /mwe/resource-manager/TextureMap.cpp
parent38a2476bcfa41b6d83a9a72d35f5acb684dc87fd (diff)
parent0476a8e9dbe7afb422862f7b1c15aaed7f3c416e (diff)
merge with master
Diffstat (limited to 'mwe/resource-manager/TextureMap.cpp')
-rw-r--r--mwe/resource-manager/TextureMap.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/mwe/resource-manager/TextureMap.cpp b/mwe/resource-manager/TextureMap.cpp
index d82975c..284f8a8 100644
--- a/mwe/resource-manager/TextureMap.cpp
+++ b/mwe/resource-manager/TextureMap.cpp
@@ -15,8 +15,7 @@ TextureMap::~TextureMap() {
}
//public
-bool TextureMap::loadFromFile(const std::string & path,
- SDL_Renderer * renderer) {
+bool TextureMap::loadFromFile(const std::string & path, SDL_Renderer * renderer) {
assert(renderer != nullptr);
assert(!path.empty());
@@ -34,12 +33,11 @@ bool TextureMap::loadFromFile(const std::string & path,
constexpr std::int32_t bmask = 0x00ff0000;
const std::int32_t amask = c == 4 ? 0xff000000 : 0;
- auto * surface = SDL_CreateRGBSurfaceFrom(data, x, y, c * 8, pitch,
- rmask, gmask, bmask, amask);
+ auto * surface
+ = SDL_CreateRGBSurfaceFrom(data, x, y, c * 8, pitch, rmask, gmask, bmask, amask);
if (!surface) {
- std::cerr << "Unable to create texture surface: " << SDL_GetError()
- << "\n";
+ std::cerr << "Unable to create texture surface: " << SDL_GetError() << "\n";
stbi_image_free(data);
return false;
}