mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 08:52:00 +00:00
- parseUndefTexture(Range)
This commit is contained in:
parent
1518156386
commit
512411d0fa
2 changed files with 31 additions and 20 deletions
|
@ -1085,26 +1085,10 @@ static int32_t defsparser(scriptfile *script)
|
|||
break;
|
||||
|
||||
case T_UNDEFTEXTURE:
|
||||
parseUndefTexture(*script, pos);
|
||||
break;
|
||||
case T_UNDEFTEXTURERANGE:
|
||||
{
|
||||
int32_t r0,r1;
|
||||
if (scriptfile_getsymbol(script,&r0)) break;
|
||||
if (tokn == T_UNDEFTEXTURERANGE)
|
||||
{
|
||||
if (scriptfile_getsymbol(script,&r1)) break;
|
||||
|
||||
if (check_tile_range("undeftexturerange", &r0, &r1, script, pos))
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
r1 = r0;
|
||||
|
||||
if (check_tile("undeftexture", r0, script, pos))
|
||||
break;
|
||||
}
|
||||
for (; r0 <= r1; r0++) tileRemoveReplacement(r0);
|
||||
}
|
||||
parseUndefTextureRange(*script, pos);
|
||||
break;
|
||||
|
||||
case T_TEXHITSCANRANGE:
|
||||
|
|
|
@ -207,6 +207,33 @@ void parseTexture(FScanner& sc, FScriptPosition& pos)
|
|||
//
|
||||
//===========================================================================
|
||||
|
||||
void parseUndefTexture(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
if (!sc.GetNumber(true)) return;
|
||||
if (ValidateTilenum("undeftexture", sc.Number, pos)) tileRemoveReplacement(sc.Number);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void parseUndefTextureRange(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
int start, end;
|
||||
if (!sc.GetNumber(start, true)) return;
|
||||
if (!sc.GetNumber(end, true)) return;
|
||||
if (ValidateTileRange("undeftexturerange", start, end, pos))
|
||||
for (int i = start; i <= end; i++) tileRemoveReplacement(i);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void parseTileFromTexture(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
FScanner::SavedPos blockend;
|
||||
|
|
Loading…
Reference in a new issue