Commit a7a71e30 authored by Richard Gobeille's avatar Richard Gobeille

Duke3d: split getactorvar/setactorvar instructions

These are actually fairly commonly used, so I'm not sure why I bothered with having them the other way before.
parent b63ad531
......@@ -2424,6 +2424,19 @@ GAMEEXEC_STATIC void VM_Execute(int const loop /*= false*/)
}
vInstruction(CON_SETACTORVAR):
insptr++;
{
int const lSprite = Gv_GetVar(*insptr++);
int const lVar1 = *insptr++;
int const lVar2 = *insptr++;
VM_ASSERT((unsigned)lSprite < MAXSPRITES, "invalid sprite %d\n", lSprite);
Gv_SetVar(lVar1, Gv_GetVar(lVar2), lSprite, vm.playerNum);
dispatch();
}
vInstruction(CON_GETACTORVAR):
insptr++;
{
......@@ -2433,10 +2446,7 @@ GAMEEXEC_STATIC void VM_Execute(int const loop /*= false*/)
VM_ASSERT((unsigned)lSprite < MAXSPRITES, "invalid sprite %d\n", lSprite);
if (VM_DECODE_INST(tw) == CON_SETACTORVAR)
Gv_SetVar(lVar1, Gv_GetVar(lVar2), lSprite, vm.playerNum);
else
Gv_SetVar(lVar2, Gv_GetVar(lVar1, lSprite, vm.playerNum));
Gv_SetVar(lVar2, Gv_GetVar(lVar1, lSprite, vm.playerNum));
dispatch();
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment