diff --git a/src/resource/File.h b/src/resource/File.h index 949023f2e..22ca534dd 100644 --- a/src/resource/File.h +++ b/src/resource/File.h @@ -14,7 +14,7 @@ class Archive; #define RESOURCE_FORMAT_BINARY 0 #define RESOURCE_FORMAT_XML 1 -#define RESOURCE_FORMAT_PNG 2 +#define RESOURCE_FORMAT_IMG 2 struct ResourceInitData { std::shared_ptr Parent; diff --git a/src/resource/ResourceFactoryPng.cpp b/src/resource/ResourceFactoryPng.cpp index 8fd1d05ae..3a0b5fa94 100644 --- a/src/resource/ResourceFactoryPng.cpp +++ b/src/resource/ResourceFactoryPng.cpp @@ -4,7 +4,7 @@ namespace Ship { bool ResourceFactoryPng::FileHasValidFormatAndReader(std::shared_ptr file) { - if (file->InitData->Format != RESOURCE_FORMAT_PNG) { + if (file->InitData->Format != RESOURCE_FORMAT_IMG) { SPDLOG_ERROR("resource file format does not match factory format."); return false; } diff --git a/src/resource/archive/Archive.cpp b/src/resource/archive/Archive.cpp index a2431528d..5322ed855 100644 --- a/src/resource/archive/Archive.cpp +++ b/src/resource/archive/Archive.cpp @@ -272,7 +272,7 @@ std::shared_ptr Archive::ReadResourceInitDataBinary(const std: resourceInitData->Path = filePath; if (headerReader == nullptr) { - SPDLOG_ERROR("Error reading OTR header from PNG: No header buffer document for file {}", filePath); + SPDLOG_ERROR("Error reading OTR header from Binary: No header buffer document for file {}", filePath); return resourceInitData; } diff --git a/src/resource/factory/PngFactory.cpp b/src/resource/factory/PngFactory.cpp index 4f3dcff2c..05105cef8 100644 --- a/src/resource/factory/PngFactory.cpp +++ b/src/resource/factory/PngFactory.cpp @@ -17,7 +17,7 @@ void user_warning_fn(png_structp png_ptr, png_const_charp warning_msg) { } } -std::shared_ptr ResourceFactoryPngTexture::ReadResource(std::shared_ptr file) { +std::shared_ptr ResourceFactoryImageTexture::ReadResource(std::shared_ptr file) { if (!FileHasValidFormatAndReader(file)) { return nullptr; } diff --git a/src/resource/factory/PngFactory.h b/src/resource/factory/PngFactory.h index 03877143f..38e1219a7 100644 --- a/src/resource/factory/PngFactory.h +++ b/src/resource/factory/PngFactory.h @@ -4,7 +4,7 @@ #include "resource/ResourceFactoryPng.h" namespace Fast { -class ResourceFactoryPngTexture : public Ship::ResourceFactoryPng { +class ResourceFactoryImageTexture : public Ship::ResourceFactoryPng { public: std::shared_ptr ReadResource(std::shared_ptr file) override; };