diff --git a/Source/Render/Textures/TextureCache.cpp b/Source/Render/Textures/TextureCache.cpp index 24c1f46..25eef10 100644 --- a/Source/Render/Textures/TextureCache.cpp +++ b/Source/Render/Textures/TextureCache.cpp @@ -1,3 +1,4 @@ +#include "Render/DeviceContext/DCSurface.h" #include "Render/RenderSystemBase.h" #include "Render/Textures/Texture.h" #include "Render/Textures/TextureCache.h" @@ -46,6 +47,12 @@ CTexture* TextureCache::Upload(int width, int height, const std::uint32_t* pixel return texture; } +// OFFSET: 0x00571660 +// FUNCTION: fn_02450 +CTexture* CreateTexture(std::uint32_t width, std::uint32_t height, std::int32_t format, bool dynamic, bool renderTarget) { + return GetRenderSystemHolder()->CreateTexture(width, height, format, dynamic, renderTarget); +} + // OFFSET: 0x00571930 // FUNCTION: fn_02455 CTexture* TextureCache::Create(const char* name, int option, bool fullSize, bool dynamic, bool renderTarget) { @@ -132,6 +139,8 @@ void TextureCache::Clear() { this->m_textures.clear(); } +// OFFSET: 0x00571B70 + // OFFSET: 0x00571C50 // FUNCTION: fn_02457 void TextureCache::ClearUnused() { diff --git a/Source/Render/Textures/TextureCache.h b/Source/Render/Textures/TextureCache.h index 3fd4b26..01fd3c2 100644 --- a/Source/Render/Textures/TextureCache.h +++ b/Source/Render/Textures/TextureCache.h @@ -34,6 +34,7 @@ public: void Remove(CTexture* texture); void Clear(); void ClearUnused(); + void Reload(); private: ResourceMgr& m_resources; @@ -44,4 +45,6 @@ private: std::map m_textures; }; +CTexture* CreateTexture(std::uint32_t width, std::uint32_t height, std::int32_t format, bool dynamic, bool renderTarget); + #endif