- added two new integral types SpriteID and TextureID, both are needed to allow proper serialization as they require something different to be written out than a regular integer.
This commit is contained in:
parent
7c122d03e9
commit
7d99552903
10 changed files with 164 additions and 17 deletions
|
|
@ -1695,6 +1695,19 @@ static void DoCast(const VMRegisters ®, const VMFrame *f, int a, int b, int c
|
|||
reg.s[a] = S_sfx[reg.d[b]].name;
|
||||
break;
|
||||
|
||||
case CAST_SID2S:
|
||||
ASSERTS(a); ASSERTD(b);
|
||||
reg.s[a] = unsigned(reg.d[b]) >= sprites.Size() ? "TNT1" : sprites[reg.d[b]].name;
|
||||
break;
|
||||
|
||||
case CAST_TID2S:
|
||||
{
|
||||
ASSERTS(a); ASSERTD(b);
|
||||
auto tex = TexMan[*(FTextureID*)&(reg.d[b])];
|
||||
reg.s[a] = tex == nullptr ? "(null)" : tex->Name.GetChars();
|
||||
break;
|
||||
}
|
||||
|
||||
default:
|
||||
assert(0);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue