mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-30 01:29:42 -06:00
VideoCommon: rewrite custom textures
This commit is contained in:
@ -4,15 +4,36 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <map>
|
||||
#include <string>
|
||||
#include <unordered_map>
|
||||
#include "VideoCommon/TextureDecoder.h"
|
||||
#include "VideoCommon/VideoCommon.h"
|
||||
|
||||
namespace HiresTextures
|
||||
class HiresTexture
|
||||
{
|
||||
void Init(const std::string& gameCode);
|
||||
bool HiresTexExists(const std::string& filename);
|
||||
PC_TexFormat GetHiresTex(const std::string& fileName, unsigned int* pWidth, unsigned int* pHeight, unsigned int* required_size, int texformat, unsigned int data_size, u8* data);
|
||||
public:
|
||||
static void Init(const std::string& gameCode);
|
||||
|
||||
}
|
||||
static HiresTexture* Search(
|
||||
const u8* texture, size_t texture_size,
|
||||
const u8* tlut, size_t tlut_size,
|
||||
u32 width, u32 height,
|
||||
int format
|
||||
);
|
||||
|
||||
~HiresTexture();
|
||||
|
||||
struct Level
|
||||
{
|
||||
u8* data;
|
||||
size_t data_size;
|
||||
u32 width, height;
|
||||
};
|
||||
std::vector<Level> m_levels;
|
||||
|
||||
static std::unordered_map<std::string, std::string> textureMap;
|
||||
|
||||
private:
|
||||
HiresTexture() {}
|
||||
|
||||
};
|
||||
|
Reference in New Issue
Block a user