mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- migrated a few more .def commands.
This commit is contained in:
parent
333581a084
commit
92697686cb
1 changed files with 7 additions and 50 deletions
|
@ -323,24 +323,11 @@ static int32_t defsparser(scriptfile *script)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case T_INCLUDEDEFAULT:
|
case T_INCLUDEDEFAULT:
|
||||||
{
|
|
||||||
defsparser_include(G_DefaultDefFile(), script, &pos);
|
defsparser_include(G_DefaultDefFile(), script, &pos);
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
case T_DEFINE:
|
case T_DEFINE:
|
||||||
{
|
parseDefine(*script, pos);
|
||||||
FString name;
|
|
||||||
int32_t number;
|
|
||||||
|
|
||||||
if (scriptfile_getstring(script,&name)) break;
|
|
||||||
if (scriptfile_getsymbol(script,&number)) break;
|
|
||||||
|
|
||||||
if (scriptfile_addsymbolvalue(script, name,number) < 0)
|
|
||||||
pos.Message(MSG_WARNING, "Warning: Symbol %s was NOT redefined to %d", name.GetChars(),number);
|
|
||||||
break;
|
break;
|
||||||
}
|
|
||||||
|
|
||||||
// OLD (DEPRECATED) DEFINITION SYNTAX
|
|
||||||
case T_DEFINETEXTURE:
|
case T_DEFINETEXTURE:
|
||||||
parseDefineTexture(*script, pos);
|
parseDefineTexture(*script, pos);
|
||||||
break;
|
break;
|
||||||
|
@ -348,43 +335,13 @@ static int32_t defsparser(scriptfile *script)
|
||||||
parseDefineSkybox(*script, pos);
|
parseDefineSkybox(*script, pos);
|
||||||
break;
|
break;
|
||||||
case T_DEFINETINT:
|
case T_DEFINETINT:
|
||||||
{
|
parseDefineTint(*script, pos);
|
||||||
int32_t pal, r,g,b,f;
|
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&pal)) break;
|
|
||||||
if (scriptfile_getnumber(script,&r)) break;
|
|
||||||
if (scriptfile_getnumber(script,&g)) break;
|
|
||||||
if (scriptfile_getnumber(script,&b)) break;
|
|
||||||
if (scriptfile_getnumber(script,&f)) break; //effects
|
|
||||||
lookups.setPaletteTint(pal,r,g,b,0,0,0,f);
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case T_ALPHAHACK:
|
case T_ALPHAHACK:
|
||||||
{
|
parseAlphahack(*script, pos);
|
||||||
int32_t tile;
|
|
||||||
double alpha;
|
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&tile)) break;
|
|
||||||
if (scriptfile_getdouble(script,&alpha)) break;
|
|
||||||
if ((uint32_t)tile < MAXTILES)
|
|
||||||
TileFiles.tiledata[tile].texture->alphaThreshold = (float)alpha;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case T_ALPHAHACKRANGE:
|
case T_ALPHAHACKRANGE:
|
||||||
{
|
parseAlphahackRange(*script, pos);
|
||||||
int32_t tilenume1,tilenume2;
|
|
||||||
double alpha;
|
|
||||||
|
|
||||||
if (scriptfile_getsymbol(script,&tilenume1)) break;
|
|
||||||
if (scriptfile_getsymbol(script,&tilenume2)) break;
|
|
||||||
if (scriptfile_getdouble(script,&alpha)) break;
|
|
||||||
|
|
||||||
if (check_tile_range("alphahackrange", &tilenume1, &tilenume2, script, pos))
|
|
||||||
break;
|
|
||||||
|
|
||||||
for (int i=tilenume1; i<=tilenume2; i++)
|
|
||||||
TileFiles.tiledata[i].texture->alphaThreshold = (float)alpha;
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case T_SPRITECOL:
|
case T_SPRITECOL:
|
||||||
case T_2DCOLIDXRANGE: // NOTE: takes precedence over 2dcol, see InitCustomColors()
|
case T_2DCOLIDXRANGE: // NOTE: takes precedence over 2dcol, see InitCustomColors()
|
||||||
|
|
Loading…
Reference in a new issue