Move D3DFormat definition into separate namespace to make it compatible to existing definitions

This commit is contained in:
Jan
2024-01-06 20:35:00 +01:00
parent c4150279d0
commit cd53c3cbe4
9 changed files with 114 additions and 109 deletions

View File

@ -88,7 +88,7 @@ void ObjLoader::LoadImageFromLoadDef(GfxImage* image, Zone* zone)
else
textureLoader.Type(TextureType::T_2D);
textureLoader.Format(static_cast<D3DFORMAT>(loadDef->format));
textureLoader.Format(static_cast<oat::D3DFORMAT>(loadDef->format));
textureLoader.HasMipMaps(!(loadDef->flags & iwi6::IMG_FLAG_NOMIPMAPS));
Texture* loadedTexture = textureLoader.LoadTexture(image->texture.loadDef->data);

View File

@ -130,7 +130,7 @@ void ObjLoader::LoadImageFromLoadDef(GfxImage* image, Zone* zone)
else
textureLoader.Type(TextureType::T_2D);
textureLoader.Format(static_cast<D3DFORMAT>(loadDef->format));
textureLoader.Format(static_cast<oat::D3DFORMAT>(loadDef->format));
textureLoader.HasMipMaps(!(loadDef->flags & iwi8::IMG_FLAG_NOMIPMAPS));
Texture* loadedTexture = textureLoader.LoadTexture(image->texture.loadDef->data);

View File

@ -106,7 +106,7 @@ void ObjLoader::LoadImageFromLoadDef(GfxImage* image, Zone* zone)
else
textureLoader.Type(TextureType::T_2D);
textureLoader.Format(static_cast<D3DFORMAT>(loadDef->format));
textureLoader.Format(static_cast<oat::D3DFORMAT>(loadDef->format));
textureLoader.HasMipMaps(!(loadDef->flags & iwi8::IMG_FLAG_NOMIPMAPS));
Texture* loadedTexture = textureLoader.LoadTexture(image->texture.loadDef->data);

View File

@ -95,7 +95,7 @@ void ObjLoader::LoadImageFromLoadDef(GfxImage* image, Zone* zone)
else
textureLoader.Type(TextureType::T_2D);
textureLoader.Format(static_cast<D3DFORMAT>(loadDef->format));
textureLoader.Format(static_cast<oat::D3DFORMAT>(loadDef->format));
textureLoader.HasMipMaps(!(loadDef->flags & iwi13::IMG_FLAG_NOMIPMAPS));
Texture* loadedTexture = textureLoader.LoadTexture(image->texture.loadDef->data);

View File

@ -4,7 +4,7 @@
Dx9TextureLoader::Dx9TextureLoader(MemoryManager* memoryManager)
: m_memory_manager(memoryManager),
m_format(D3DFMT_UNKNOWN),
m_format(oat::D3DFMT_UNKNOWN),
m_type(TextureType::T_2D),
m_has_mip_maps(false),
m_width(1u),
@ -24,7 +24,7 @@ const ImageFormat* Dx9TextureLoader::GetFormatForDx9Format() const
return nullptr;
}
Dx9TextureLoader& Dx9TextureLoader::Format(const D3DFORMAT format)
Dx9TextureLoader& Dx9TextureLoader::Format(const oat::D3DFORMAT format)
{
m_format = format;
return *this;

View File

@ -10,7 +10,7 @@
class Dx9TextureLoader
{
MemoryManager* m_memory_manager;
D3DFORMAT m_format;
oat::D3DFORMAT m_format;
TextureType m_type;
bool m_has_mip_maps;
size_t m_width;
@ -22,7 +22,7 @@ class Dx9TextureLoader
public:
explicit Dx9TextureLoader(MemoryManager* memoryManager);
Dx9TextureLoader& Format(D3DFORMAT format);
Dx9TextureLoader& Format(oat::D3DFORMAT format);
Dx9TextureLoader& Type(TextureType textureType);
Dx9TextureLoader& HasMipMaps(bool hasMipMaps);
Dx9TextureLoader& Width(size_t width);