mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-10-03 22:58:56 +00:00
VideoCommon: rewrite custom textures
This commit is contained in:
parent
a09d854636
commit
51bfc4c52a
4 changed files with 146 additions and 167 deletions
|
@ -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() {}
|
||||
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue