diff options
| author | untodesu <kirill@untode.su> | 2025-12-26 23:17:56 +0500 |
|---|---|---|
| committer | untodesu <kirill@untode.su> | 2025-12-26 23:17:56 +0500 |
| commit | 0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e (patch) | |
| tree | 90ddefa28b40b6384dd9618bb7573704de2733a9 /src/core/resource/image.cc | |
| parent | 6bb4233d5b2a1688e63c947542e92ec5d5a857a6 (diff) | |
| download | voxelius-0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e.tar.bz2 voxelius-0f111cf51b00c4e884b7e53b4fd7ff6e38d8af5e.zip | |
Add include guards and header comments to sources
Diffstat (limited to 'src/core/resource/image.cc')
| -rw-r--r-- | src/core/resource/image.cc | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/core/resource/image.cc b/src/core/resource/image.cc index 6a2109e..aded098 100644 --- a/src/core/resource/image.cc +++ b/src/core/resource/image.cc @@ -1,3 +1,8 @@ +// SPDX-License-Identifier: BSD-2-Clause +// Copyright (c) 2025 Kirill Dmitrievich +// File: image.cc +// Description: Image resource + #include "core/pch.hh" #include "core/resource/image.hh" @@ -31,18 +36,18 @@ static const void* image_load_func(const char* name, std::uint32_t flags) callbacks.skip = &stbi_physfs_skip; callbacks.eof = &stbi_physfs_eof; - stbi_set_flip_vertically_on_load(bool(flags & IMAGE_LOAD_FLIP)); + stbi_set_flip_vertically_on_load(bool(flags & IMGFLAG_FLIP)); auto file = PHYSFS_openRead(name); if(file == nullptr) { - spdlog::error("image: {}: {}", name, physfs_error()); + spdlog::error("image: {}: {}", name, physfs::last_error()); return nullptr; } int desired_channels; - if(flags & IMAGE_LOAD_GRAY) { + if(flags & IMGFLAG_GRAY) { desired_channels = STBI_grey; } else { |
