mirror of
https://github.com/ZDoom/Raze.git
synced 2025-05-30 08:51:08 +00:00
- backend update from GZDoom.
Mainly quaternion math and sound system cleanup.
This commit is contained in:
parent
f1bfaac301
commit
2ffdf3d0e1
25 changed files with 919 additions and 259 deletions
|
@ -1887,7 +1887,22 @@ static int ExecScriptFunc(VMFrameStack *stack, VMReturn *ret, int numret)
|
|||
ASSERTF(B+3); ASSERTKF(C+3);
|
||||
fcp = &konstf[C];
|
||||
goto Do_EQV4;
|
||||
|
||||
OP(MULQV3_RR):
|
||||
ASSERTF(a + 2); ASSERTF(B + 3); ASSERTF(C + 2);
|
||||
{
|
||||
const DQuaternion& q = reinterpret_cast<DQuaternion&>(reg.f[B]);
|
||||
const DVector3& v = reinterpret_cast<DVector3&>(reg.f[C]);
|
||||
reinterpret_cast<DVector3&>(reg.f[A]) = q * v;
|
||||
}
|
||||
NEXTOP;
|
||||
OP(MULQQ_RR):
|
||||
ASSERTF(a + 3); ASSERTF(B + 3); ASSERTF(C + 3);
|
||||
{
|
||||
const DQuaternion& q1 = reinterpret_cast<DQuaternion&>(reg.f[B]);
|
||||
const DQuaternion& q2 = reinterpret_cast<DQuaternion&>(reg.f[C]);
|
||||
reinterpret_cast<DQuaternion&>(reg.f[A]) = q1 * q2;
|
||||
}
|
||||
NEXTOP;
|
||||
OP(ADDA_RR):
|
||||
ASSERTA(a); ASSERTA(B); ASSERTD(C);
|
||||
c = reg.d[C];
|
||||
|
@ -2107,12 +2122,12 @@ static void DoCast(const VMRegisters ®, const VMFrame *f, int a, int b, int c
|
|||
|
||||
case CAST_S2So:
|
||||
ASSERTD(a); ASSERTS(b);
|
||||
reg.d[a] = FSoundID(reg.s[b]);
|
||||
reg.d[a] = S_FindSound(reg.s[b]).index();
|
||||
break;
|
||||
|
||||
case CAST_So2S:
|
||||
ASSERTS(a); ASSERTD(b);
|
||||
reg.s[a] = soundEngine->GetSoundName(reg.d[b]);
|
||||
reg.s[a] = soundEngine->GetSoundName(FSoundID::fromInt(reg.d[b]));
|
||||
break;
|
||||
|
||||
case CAST_SID2S:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue