mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2026-05-02 00:19:35 +00:00
chore: update image namespacing
This commit is contained in:
@@ -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
|
||||
@@ -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