private void Anim()
{
// Follow an animation sequence
var grafixProg = _skyCompact.GetGrafixPtr(_compact);
while (grafixProg.Value != 0)
{
_compact.Core.grafixProgPos += 3; // all types are 3 words.
if (grafixProg.Value == LF_START_FX)
{ // do fx
grafixProg.Offset += 2;
ushort sound = grafixProg.Value; grafixProg.Offset += 2;
ushort volume = grafixProg.Value; grafixProg.Offset += 2;
// channel 0
FnStartFx(sound, 0, volume);
}
else if (grafixProg.Value >= LF_START_FX)
{ // do sync
grafixProg.Offset += 2;
Compact cpt = _skyCompact.FetchCpt(grafixProg.Value); grafixProg.Offset += 2;
cpt.Core.sync = grafixProg.Value; grafixProg.Offset += 2;
}
else
{ // put coordinates and frame in
_compact.Core.xcood = grafixProg.Value; grafixProg.Offset += 2;
_compact.Core.ycood = grafixProg.Value; grafixProg.Offset += 2;
_compact.Core.frame = (ushort)(grafixProg.Value | _compact.Core.offset); grafixProg.Offset += 2;
return;
}
}
_compact.Core.downFlag = 0;
_compact.Core.logic = L_SCRIPT;
LogicScript();
}