- backend update from GZDoom.

Mainly quaternion math and sound system cleanup.
This commit is contained in:
Christoph Oelckers 2022-11-24 16:56:46 +01:00
parent f1bfaac301
commit 2ffdf3d0e1
25 changed files with 919 additions and 259 deletions

View file

@ -1332,9 +1332,9 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FSoundID &sid, FSoundI
if (!arc.soundNamesAreUnique)
{
//If sound name here is not reliable, we need to save by index instead.
int id = sid;
int id = sid.index();
Serialize(arc, key, id, nullptr);
if (arc.isReading()) sid = FSoundID(id);
if (arc.isReading()) sid = FSoundID::fromInt(id);
}
else if (arc.isWriting())
{
@ -1354,16 +1354,16 @@ FSerializer &Serialize(FSerializer &arc, const char *key, FSoundID &sid, FSoundI
assert(val->IsString() || val->IsNull());
if (val->IsString())
{
sid = UnicodeToString(val->GetString());
sid = S_FindSound(UnicodeToString(val->GetString()));
}
else if (val->IsNull())
{
sid = 0;
sid = NO_SOUND;
}
else
{
Printf(TEXTCOLOR_RED "string type expected for '%s'\n", key);
sid = 0;
sid = NO_SOUND;
arc.mErrors++;
}
}