Skip to content

Commit

Permalink
rename around
Browse files Browse the repository at this point in the history
  • Loading branch information
coco875 committed Jan 8, 2025
1 parent ae30d57 commit 030ab72
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/resource/File.h
Original file line number Diff line number Diff line change
Expand Up @@ -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<Archive> Parent;
Expand Down
2 changes: 1 addition & 1 deletion src/resource/ResourceFactoryPng.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

namespace Ship {
bool ResourceFactoryPng::FileHasValidFormatAndReader(std::shared_ptr<File> 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;
}
Expand Down
2 changes: 1 addition & 1 deletion src/resource/archive/Archive.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ std::shared_ptr<ResourceInitData> 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;
}

Expand Down
2 changes: 1 addition & 1 deletion src/resource/factory/PngFactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ void user_warning_fn(png_structp png_ptr, png_const_charp warning_msg) {
}
}

std::shared_ptr<Ship::IResource> ResourceFactoryPngTexture::ReadResource(std::shared_ptr<Ship::File> file) {
std::shared_ptr<Ship::IResource> ResourceFactoryImageTexture::ReadResource(std::shared_ptr<Ship::File> file) {
if (!FileHasValidFormatAndReader(file)) {
return nullptr;
}
Expand Down
2 changes: 1 addition & 1 deletion src/resource/factory/PngFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
#include "resource/ResourceFactoryPng.h"

namespace Fast {
class ResourceFactoryPngTexture : public Ship::ResourceFactoryPng {
class ResourceFactoryImageTexture : public Ship::ResourceFactoryPng {
public:
std::shared_ptr<Ship::IResource> ReadResource(std::shared_ptr<Ship::File> file) override;
};
Expand Down

0 comments on commit 030ab72

Please sign in to comment.