mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-03-17 10:23:02 +00:00
chore: update image namespacing
This commit is contained in:
15
src/ObjLoading/Image/ImageLoaderCommon.cpp
Normal file
15
src/ObjLoading/Image/ImageLoaderCommon.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "ImageLoaderCommon.h"
|
||||
|
||||
namespace image
|
||||
{
|
||||
std::optional<AssetCreationResult> CommonImageLoaderResult::GetResultIfCancelled() const
|
||||
{
|
||||
if (m_failure)
|
||||
return AssetCreationResult::Failure();
|
||||
|
||||
if (!m_texture)
|
||||
return AssetCreationResult::NoAction();
|
||||
|
||||
return std::nullopt;
|
||||
}
|
||||
} // namespace image
|
||||
23
src/ObjLoading/Image/ImageLoaderCommon.h
Normal file
23
src/ObjLoading/Image/ImageLoaderCommon.h
Normal file
@@ -0,0 +1,23 @@
|
||||
#pragma once
|
||||
|
||||
#include "Asset/AssetCreationResult.h"
|
||||
#include "Image/IwiTypes.h"
|
||||
#include "Image/Texture.h"
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <string>
|
||||
|
||||
namespace image
|
||||
{
|
||||
struct CommonImageLoaderResult
|
||||
{
|
||||
std::optional<AssetCreationResult> GetResultIfCancelled() const;
|
||||
|
||||
bool m_failure;
|
||||
std::string m_iwi_path;
|
||||
std::unique_ptr<Texture> m_texture;
|
||||
};
|
||||
|
||||
CommonImageLoaderResult LoadImageCommon();
|
||||
} // namespace image
|
||||
Reference in New Issue
Block a user