From 0c391fdbce5a079cf03e483eb6174dd47806163d Mon Sep 17 00:00:00 2001 From: chai Date: Wed, 7 Aug 2019 21:08:47 +0800 Subject: *misc --- source/modules/asura-core/Image/ImageData.cpp | 2 +- source/modules/asura-core/Image/ImageData.h | 14 +++++++------- source/modules/asura-core/Image/ImageDecodeTask.h | 6 +++--- source/modules/asura-core/Image/ImageDecoder.h | 6 +++--- source/modules/asura-core/Image/PngDecoder.cpp | 4 ++-- source/modules/asura-core/Image/PngDecoder.h | 4 ++-- source/modules/asura-core/Image/StbDecoder.cpp | 6 +++--- source/modules/asura-core/Image/StbDecoder.h | 4 ++-- source/modules/asura-core/Image/binding/_image_data.cpp | 6 +++--- 9 files changed, 26 insertions(+), 26 deletions(-) (limited to 'source/modules/asura-core/Image') diff --git a/source/modules/asura-core/Image/ImageData.cpp b/source/modules/asura-core/Image/ImageData.cpp index c75166f..bbfd177 100644 --- a/source/modules/asura-core/Image/ImageData.cpp +++ b/source/modules/asura-core/Image/ImageData.cpp @@ -31,7 +31,7 @@ ImageData::~ImageData() delete[] pixels; } -void ImageData::Decode(IO::DataBuffer& buffer) +void ImageData::Decode(FileSystem::DataBuffer& buffer) { for (ImageDecoder* decoder : ImageDecoders) { diff --git a/source/modules/asura-core/Image/ImageData.h b/source/modules/asura-core/Image/ImageData.h index cd2fe1a..2d70edc 100644 --- a/source/modules/asura-core/Image/ImageData.h +++ b/source/modules/asura-core/Image/ImageData.h @@ -3,11 +3,11 @@ #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "../Graphics/Texture.h" #include "../Graphics/Color.h" @@ -19,7 +19,7 @@ class ImageDecoder; class ImageData ASURA_FINAL : public Scripting::Portable - , public AEIO::DecodedData + , public AEFileSystem::DecodedData { public: @@ -29,7 +29,7 @@ public: ImageData(); ~ImageData(); - void Decode(AEIO::DataBuffer& buffer) override; + void Decode(AEFileSystem::DataBuffer& buffer) override; void Lock(); void Unlock(); diff --git a/source/modules/asura-core/Image/ImageDecodeTask.h b/source/modules/asura-core/Image/ImageDecodeTask.h index 74ecf24..194ac3e 100644 --- a/source/modules/asura-core/Image/ImageDecodeTask.h +++ b/source/modules/asura-core/Image/ImageDecodeTask.h @@ -1,9 +1,9 @@ #ifndef _ASURA_IMAGE_DECODE_TASK_H_ #define _ASURA_IMAGE_DECODE_TASK_H_ -#include -#include -#include +#include +#include +#include namespace_begin(AsuraEngine) namespace_begin(Image) diff --git a/source/modules/asura-core/Image/ImageDecoder.h b/source/modules/asura-core/Image/ImageDecoder.h index 7de92d6..6cea8fd 100644 --- a/source/modules/asura-core/Image/ImageDecoder.h +++ b/source/modules/asura-core/Image/ImageDecoder.h @@ -1,7 +1,7 @@ #ifndef _ASURA_ENGINE_IMAGE_DECODER_H_ #define _ASURA_ENGINE_IMAGE_DECODER_H_ -#include +#include #include "ImageData.h" @@ -18,12 +18,12 @@ public: /// /// 判断内存是否能用本decoder解压 /// - virtual bool CanDecode(AEIO::DataBuffer& input) = 0; + virtual bool CanDecode(AEFileSystem::DataBuffer& input) = 0; /// /// 输入一个编码后的内存,输出一个解压后的Image data,如果解压失败返回nullptr /// - virtual void Decode(AEIO::DataBuffer& input, ImageData& target) = 0; + virtual void Decode(AEFileSystem::DataBuffer& input, ImageData& target) = 0; }; diff --git a/source/modules/asura-core/Image/PngDecoder.cpp b/source/modules/asura-core/Image/PngDecoder.cpp index 618c16e..b314561 100644 --- a/source/modules/asura-core/Image/PngDecoder.cpp +++ b/source/modules/asura-core/Image/PngDecoder.cpp @@ -3,12 +3,12 @@ namespace_begin(AsuraEngine) namespace_begin(Image) -bool PNGDecoder::CanDecode(AEIO::DataBuffer& buffer) +bool PNGDecoder::CanDecode(AEFileSystem::DataBuffer& buffer) { return false; } -void PNGDecoder::Decode(AEIO::DataBuffer& buffer, ImageData& data) +void PNGDecoder::Decode(AEFileSystem::DataBuffer& buffer, ImageData& data) { } diff --git a/source/modules/asura-core/Image/PngDecoder.h b/source/modules/asura-core/Image/PngDecoder.h index b6ea3ba..3b2a39c 100644 --- a/source/modules/asura-core/Image/PngDecoder.h +++ b/source/modules/asura-core/Image/PngDecoder.h @@ -13,9 +13,9 @@ class PNGDecoder ASURA_FINAL: public ImageDecoder { public: - bool CanDecode(AEIO::DataBuffer& buffer) override; + bool CanDecode(AEFileSystem::DataBuffer& buffer) override; - void Decode(AEIO::DataBuffer& buffer, ImageData& data) override; + void Decode(AEFileSystem::DataBuffer& buffer, ImageData& data) override; }; diff --git a/source/modules/asura-core/Image/StbDecoder.cpp b/source/modules/asura-core/Image/StbDecoder.cpp index 8d3537c..101b148 100644 --- a/source/modules/asura-core/Image/StbDecoder.cpp +++ b/source/modules/asura-core/Image/StbDecoder.cpp @@ -1,4 +1,4 @@ -#include +#include #include "StbDecoder.h" @@ -10,7 +10,7 @@ using namespace AEGraphics; namespace_begin(AsuraEngine) namespace_begin(Image) -bool STBDecoder::CanDecode(IO::DataBuffer& buffer) +bool STBDecoder::CanDecode(FileSystem::DataBuffer& buffer) { int w = 0; int h = 0; @@ -21,7 +21,7 @@ bool STBDecoder::CanDecode(IO::DataBuffer& buffer) return status == 1 && w > 0 && h > 0; } -void STBDecoder::Decode(IO::DataBuffer& db, ImageData& imageData) +void STBDecoder::Decode(FileSystem::DataBuffer& db, ImageData& imageData) { const stbi_uc *buffer = (const stbi_uc *)db.GetData(); // databuffer数据长 diff --git a/source/modules/asura-core/Image/StbDecoder.h b/source/modules/asura-core/Image/StbDecoder.h index a86073a..23e8c38 100644 --- a/source/modules/asura-core/Image/StbDecoder.h +++ b/source/modules/asura-core/Image/StbDecoder.h @@ -14,9 +14,9 @@ class STBDecoder ASURA_FINAL { public: - bool CanDecode(AEIO::DataBuffer& buffer) override; + bool CanDecode(AEFileSystem::DataBuffer& buffer) override; - void Decode(AEIO::DataBuffer& buffer, ImageData& data) override; + void Decode(AEFileSystem::DataBuffer& buffer, ImageData& data) override; }; diff --git a/source/modules/asura-core/Image/binding/_image_data.cpp b/source/modules/asura-core/Image/binding/_image_data.cpp index 77f3a96..375f854 100644 --- a/source/modules/asura-core/Image/binding/_image_data.cpp +++ b/source/modules/asura-core/Image/binding/_image_data.cpp @@ -1,11 +1,11 @@ -#include -#include +#include +#include #include "../ImageData.h" using namespace std; using namespace AEThreading; -using namespace AEIO; +using namespace AEFileSystem; namespace_begin(AsuraEngine) namespace_begin(Image) -- cgit v1.1-26-g67d0