2022-07-02 05:34:01 +00:00
|
|
|
#ifndef _CTEXTURE_HPP
|
|
|
|
#define _CTEXTURE_HPP
|
2022-07-02 05:30:04 +00:00
|
|
|
|
|
|
|
#include "types.h"
|
|
|
|
|
2022-08-30 22:48:44 +00:00
|
|
|
#include <dolphin/gx/GXEnum.h>
|
|
|
|
|
2022-09-13 04:26:54 +00:00
|
|
|
class CInputStream;
|
|
|
|
|
2022-07-02 05:30:04 +00:00
|
|
|
class CTexture {
|
|
|
|
public:
|
|
|
|
enum EClampMode {
|
|
|
|
Clamp,
|
|
|
|
Repeat,
|
|
|
|
Mirror,
|
|
|
|
};
|
2022-09-13 04:26:54 +00:00
|
|
|
enum EAutoMipmap {
|
|
|
|
kAM_Zero,
|
|
|
|
};
|
|
|
|
enum EBlackKey {
|
|
|
|
kBK_Zero,
|
|
|
|
};
|
|
|
|
|
|
|
|
CTexture(CInputStream& stream, EAutoMipmap mip, EBlackKey bk);
|
2022-07-02 05:30:04 +00:00
|
|
|
|
|
|
|
void Load(GXTexMapID texMapId, EClampMode clampMode) const;
|
2022-08-30 22:48:44 +00:00
|
|
|
|
|
|
|
static void InvalidateTexmap(GXTexMapID id);
|
2022-09-13 04:26:54 +00:00
|
|
|
|
2022-10-01 08:32:56 +00:00
|
|
|
s16 GetWidth() const { return mWidth; }
|
|
|
|
s16 GetHeight() const { return mHeight; }
|
2022-09-13 04:26:54 +00:00
|
|
|
private:
|
2022-10-01 08:32:56 +00:00
|
|
|
u32 mTexelFormat; // TODO: Enum
|
|
|
|
s16 mWidth;
|
|
|
|
s16 mHeight;
|
|
|
|
u8 pad[0x60];
|
2022-07-02 05:30:04 +00:00
|
|
|
};
|
|
|
|
|
2022-09-18 06:05:46 +00:00
|
|
|
#endif
|