iw4x-client/src/Components/Modules/Materials.hpp

46 lines
1.3 KiB
C++
Raw Normal View History

2017-01-20 08:36:52 -05:00
#pragma once
2017-01-19 16:23:59 -05:00
namespace Components
{
class Materials : public Component
{
public:
Materials();
~Materials();
static int FormatImagePath(char* buffer, size_t size, int, int, const char* image);
2018-12-17 08:29:18 -05:00
static Game::Material* Create(const std::string& name, Game::GfxImage* image);
static void Delete(Game::Material* material, bool deleteImage = false);
2018-12-17 08:29:18 -05:00
static Game::GfxImage* CreateImage(const std::string& name, unsigned int width, unsigned int height, unsigned int depth, unsigned int flags, _D3DFORMAT format);
static void DeleteImage(Game::GfxImage* image);
2017-06-04 18:00:46 -04:00
static bool IsValid(Game::Material* material);
2017-01-19 16:23:59 -05:00
private:
2017-06-05 08:31:45 -04:00
static std::vector<Game::GfxImage*> ImageTable;
2017-06-04 18:00:46 -04:00
static std::vector<Game::Material*> MaterialTable;
2017-01-19 16:23:59 -05:00
static int ImageNameLength;
static Utils::Hook ImageVersionCheckHook;
static void ImageVersionCheck();
static Game::Material* ResolveMaterial(const char* stringPtr);
static void DrawMaterialStub();
static void PostDrawMaterialStub();
static int WriteDeathMessageIcon(char* string, int offset, Game::Material* material);
static void DeathMessageStub();
#ifdef DEBUG
static void DumpImageCfg(int, const char*, const char* material);
static void DumpImageCfgPath(int, const char*, const char* material);
#endif
static int MaterialComparePrint(Game::Material* m1, Game::Material* m2);
2017-06-04 18:00:46 -04:00
static void DeleteAll();
2017-01-19 16:23:59 -05:00
};
}