[Material] Fix previews for zonebuilder

This commit is contained in:
momo5502 2016-12-14 18:12:29 +01:00
parent bb6b1b0764
commit f0e234dd2a
2 changed files with 5 additions and 3 deletions

View File

@ -26,7 +26,9 @@ namespace Assets
return;
}
Components::FileSystem::File iwi(fmt::sprintf("images/%s.iwi", name.data()));
char nameBuffer[MAX_PATH] = { 0 };
Components::Materials::FormatImagePath(nameBuffer, sizeof(nameBuffer), 0, 0, name.data());
Components::FileSystem::File iwi(nameBuffer);
if (!iwi.exists())
{

View File

@ -10,6 +10,8 @@ namespace Components
const char* getName() { return "Materials"; };
#endif
static int FormatImagePath(char* buffer, size_t size, int, int, const char* image);
private:
static int ImageNameLength;
@ -23,8 +25,6 @@ namespace Components
static int WriteDeathMessageIcon(char* string, int offset, Game::Material* material);
static void DeathMessageStub();
static int FormatImagePath(char* buffer, size_t size, int, int, const char* image);
#ifdef DEBUG
static void DumpImageCfg(int, const char*, const char* material);
static void DumpImageCfgPath(int, const char*, const char* material);