mirror of
https://gitea.windcorp.ru/Wind-Corporation/Progressia.git
synced 2025-07-05 13:57:55 +03:00
Added logging, refactored versioning; STB is now included
- Added logging - Rewrote versioning code - Refactored dependency management - STB (stb_image.h) is now included - All other dependencies now use find_package - Cross-compilation from Linux to Windows is now possible
This commit is contained in:
@ -8,6 +8,9 @@
|
||||
|
||||
#include "stb/stb_image.h"
|
||||
|
||||
#include "../logging.h"
|
||||
using namespace progressia::main::logging;
|
||||
|
||||
namespace progressia {
|
||||
namespace main {
|
||||
|
||||
@ -22,8 +25,7 @@ Image loadImage(const std::filesystem::path &path) {
|
||||
std::ifstream file(path, std::ios::ate | std::ios::binary);
|
||||
|
||||
if (!file.is_open()) {
|
||||
std::cout << "Could not read a PNG image from file " << path
|
||||
<< std::endl;
|
||||
fatal() << "Could not access a PNG image in file " << path;
|
||||
// REPORT_ERROR
|
||||
exit(1);
|
||||
}
|
||||
@ -45,8 +47,7 @@ Image loadImage(const std::filesystem::path &path) {
|
||||
&channelsInFile, STBI_rgb_alpha);
|
||||
|
||||
if (stbAllocatedData == NULL) {
|
||||
std::cout << "Could not load a PNG image from file " << path
|
||||
<< std::endl;
|
||||
fatal() << "Could not decode a PNG image from file " << path;
|
||||
// REPORT_ERROR
|
||||
exit(1);
|
||||
}
|
||||
|
Reference in New Issue
Block a user