mirror of
https://github.com/DrBeef/Raze.git
synced 2025-01-18 15:11:51 +00:00
- rffdefineid
This commit is contained in:
parent
643b969dff
commit
40a632a2ae
2 changed files with 37 additions and 27 deletions
|
@ -2303,36 +2303,11 @@ static int32_t defsparser(scriptfile *script)
|
|||
}
|
||||
break;
|
||||
case T_NEWGAMECHOICES: // stub
|
||||
{
|
||||
FScanner::SavedPos blockend;
|
||||
if (scriptfile_getbraces(script,&blockend))
|
||||
break;
|
||||
scriptfile_setposition(script, blockend);
|
||||
parseNewGameChoices(*script, pos);
|
||||
break;
|
||||
}
|
||||
|
||||
case T_RFFDEFINEID:
|
||||
{
|
||||
FString resName;
|
||||
FString resType;
|
||||
FString rffName;
|
||||
int resID;
|
||||
|
||||
if (scriptfile_getstring(script, &resName))
|
||||
break;
|
||||
|
||||
if (scriptfile_getstring(script, &resType))
|
||||
break;
|
||||
|
||||
if (scriptfile_getnumber(script, &resID))
|
||||
break;
|
||||
|
||||
if (scriptfile_getstring(script, &rffName))
|
||||
break;
|
||||
|
||||
FStringf name("%s.%s", resName.GetChars(), resType.GetChars());
|
||||
fileSystem.CreatePathlessCopy(name, resID, 0);
|
||||
}
|
||||
parseRffDefineId(*script, pos);
|
||||
break;
|
||||
|
||||
|
||||
|
|
|
@ -643,3 +643,38 @@ void parseMultiPsky(FScanner& sc, FScriptPosition& pos)
|
|||
auto psky = tileSetupSky(sky.tilenum);
|
||||
*psky = sky;
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
//
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void parseRffDefineId(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
FString resName;
|
||||
FString resType;
|
||||
int resID;
|
||||
|
||||
if (!sc.GetString(resName)) return;
|
||||
if (!sc.GetString(resType)) return;
|
||||
if (!sc.GetNumber(resID)) return;
|
||||
if (!sc.GetString()) return;
|
||||
resName.AppendFormat(".%s", resType.GetChars());
|
||||
fileSystem.CreatePathlessCopy(resName, resID, 0);
|
||||
}
|
||||
|
||||
//===========================================================================
|
||||
//
|
||||
// empty stub
|
||||
//
|
||||
//===========================================================================
|
||||
|
||||
void parseNewGameChoices(FScanner& sc, FScriptPosition& pos)
|
||||
{
|
||||
FScanner::SavedPos blockend;
|
||||
|
||||
if (sc.StartBraces(&blockend)) return;
|
||||
while (!sc.FoundEndBrace(blockend)) {}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue