mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-02-15 14:50:20 -05:00
![Kenix3](/assets/img/avatar_default.png)
* Merges GlobalCtx2 and Window classes. * Includes condition variable in File. * add mac specific include * sstream to get past "implicit instantiation of undefined template" error * switch/wiiu includes * that file doesn't exist * more wii u globalctx2 stuff Co-authored-by: briaguya <briaguya@alice>
49 lines
982 B
C++
49 lines
982 B
C++
#include "Resource.h"
|
|
#include "StrHash.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;
|
|
};
|
|
} |