mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2024-11-10 03:25:07 -05:00
d24c8453db
subrepo: subdir: "libultraship" merged: "a484cda98" upstream: origin: "https://github.com/HarbourMasters/libultraship.git" branch: "main" commit: "a484cda98" git-subrepo: version: "0.4.1" origin: "???" commit: "???"
48 lines
961 B
C++
48 lines
961 B
C++
#include "Resource.h"
|
|
|
|
namespace Ship
|
|
{
|
|
enum class MaterialCmt
|
|
{
|
|
Wrap = 0,
|
|
Mirror = 1,
|
|
Clamp = 2
|
|
};
|
|
|
|
class ShaderParam
|
|
{
|
|
public:
|
|
strhash name;
|
|
DataType dataType;
|
|
uint64_t value;
|
|
|
|
ShaderParam(BinaryReader* reader);
|
|
};
|
|
|
|
class MaterialV0 : public ResourceFile
|
|
{
|
|
public:
|
|
// Typical N64 Stuff
|
|
MaterialCmt cmtH, cmtV;
|
|
uint8_t clrR, clrG, clrB, clrA, clrM, clrL;
|
|
|
|
// Modern Stuff
|
|
strhash shaderID;
|
|
uint32_t shaderParamsCnt;
|
|
uint32_t offsetToShaderEntries;
|
|
|
|
void ParseFileBinary(BinaryReader* reader, Resource* res) override;
|
|
};
|
|
|
|
class Material : public Resource
|
|
{
|
|
public:
|
|
// Typical N64 Stuff
|
|
MaterialCmt cmtH, cmtV;
|
|
uint8_t clrR, clrG, clrB, clrA, clrM, clrL;
|
|
|
|
// Modern Stuff
|
|
strhash shaderID;
|
|
std::vector<ShaderParam*> shaderParams;
|
|
};
|
|
} |