ID24 interlevel lumps implementation

This commit is contained in:
Cacodemon345 2024-08-15 23:32:54 +06:00 committed by Christoph Oelckers
commit e88d912892
9 changed files with 604 additions and 64 deletions

View file

@ -197,7 +197,10 @@ void FSerializer::Close()
}
if (mErrors > 0)
{
I_Error("%d errors parsing JSON", mErrors);
if (mLumpName.IsNotEmpty())
I_Error("%d errors parsing JSON lump %s", mErrors, mLumpName.GetChars());
else
I_Error("%d errors parsing JSON", mErrors);
}
}
@ -331,6 +334,28 @@ bool FSerializer::HasObject(const char* name)
//
//==========================================================================
bool FSerializer::IsKeyNull(const char* name)
{
if (isReading())
{
auto val = r->FindKey(name);
if (val != nullptr)
{
if (val->IsNull())
{
return true;
}
}
}
return false;
}
//==========================================================================
//
//
//
//==========================================================================
void FSerializer::EndObject()
{
if (isWriting())