29 #include "../idlib/precompiled.h"
42 int domain =
values.Num() - 1;
50 if ( index >= domain - 1 ) {
52 }
else if ( index <= 0 ) {
56 iFrac = index - iIndex;
65 iFrac = index - iIndex;
66 iIndex = iIndex % domain;
72 return values[iIndex] * ( 1.0f - iFrac ) +
values[iIndex + 1] * iFrac;
130 if ( token ==
"}" ) {
134 if ( token.
Icmp(
"snap" ) == 0 ) {
136 }
else if ( token.
Icmp(
"clamp" ) == 0 ) {
138 }
else if ( token.
Icmp(
"{" ) == 0 ) {
153 if ( token ==
"}" ) {
156 if ( token ==
"," ) {
159 src.
Warning(
"expected comma or brace" );
int GetLineNum(void) const
GLboolean GLenum GLenum GLvoid * values
const char * GetFileName(void) const
const int DECL_LEXER_FLAGS
virtual void FreeData(void)
float ParseFloat(bool *errorFlag=NULL)
int Icmp(const char *text) const
static int FtoiFast(float f)
static float Floor(float f)
virtual bool Parse(const char *text, const int textLength)
int LoadMemory(const char *ptr, int length, const char *name, int startLine=1)
virtual size_t Size(void) const
static float Ceil(float f)
void void Warning(const char *str,...) id_attribute((format(printf
const char * c_str(void) const
int SkipUntilString(const char *string)
virtual const char * DefaultDefinition(void) const
int ReadToken(idToken *token)
float TableLookup(float index) const