28 #include "../../idlib/precompiled.h"
64 #define MATERIAL_DEF_FILE "MaterialEditorDefs.med"
117 if ( token ==
"}" ) {
123 if(!token.
Icmp(
"TYPE_GROUP")) {
125 }
else if(!token.
Icmp(
"TYPE_BOOL")) {
127 }
else if(!token.
Icmp(
"TYPE_STRING")) {
129 }
else if(!token.
Icmp(
"TYPE_FLOAT")) {
131 }
else if(!token.
Icmp(
"TYPE_INT")) {
static void InitializeMaterialDefList(idLexer *src, const char *typeName, MaterialDefList *list)
Loads a single type of material attributes and adds them to the supplied MaterialDefList object...
GLsizei const GLfloat * value
MaterialDef(void)
Constructor.
DWORD GetViewData(const char *viewName)
Returns view specific data associated with the material definition.
virtual int ReadFile(const char *relativePath, void **buffer, ID_TIME_T *timestamp=NULL)=0
#define MATERIAL_DEF_FILE
idFileSystem * fileSystem
GLuint GLuint GLsizei GLenum type
idHashTable< DWORD > viewData
virtual void FreeFile(void *buffer)=0
int Icmp(const char *text) const
static void DestroyMaterialDefLists()
Destroys all MaterialDef instances and clears the material attribute grouping lists.
int ExpectAnyToken(idToken *token)
Represents a single attribute in a material.
void Set(const char *key, Type &value)
int LoadMemory(const char *ptr, int length, const char *name, int startLine=1)
bool Get(const char *key, Type **value=NULL) const
int Append(const type &obj)
void SetViewData(const char *viewName, DWORD value)
Sets view specific data for the material definition.
static MaterialDefList materialDefs[MATERIAL_DEF_NUM]
GLsizei const GLcharARB const GLint * length
static void InitializeMaterialDefLists()
Loads the material definition file instatiates MaterialDef objects for each definition and groups the...
int SkipUntilString(const char *string)
static MaterialDefList * GetMaterialDefs(int type)
Returns the MaterialDefList for the specified attribute grouping.
virtual ~MaterialDef(void)
Destructor.
virtual void Error(const char *fmt,...) id_attribute((format(printf
int ReadToken(idToken *token)