public static TransitionActorSpawn NewMaskTransitionActor(byte[] record) { short[] rec = Endian.BytesToBigShorts(record); var actor = rec[2]; if (!MaskActorParsers.TryGetValue(actor, out XActorParser xactorParser)) { return(new TransitionActorSpawn(record)); } return(new XTransitionActorSpawn(rec, xactorParser.Description, xactorParser.GetVariables(rec, CaptureExpression.GetOcaActorValue))); }
public static TransitionActorSpawn NewOcaTransitionActor(byte[] record) { short[] rec = Endian.BytesToBigShorts(record); var actor = rec[2]; if (!OcarinaActorParsers.TryGetValue(actor, out XActorParser xActorParser)) { return(new TransitionActorSpawn(record)); } CaptureExpression.GetValueDelegate capExpr = CaptureExpression.GetOcaActorValue; string desc = xActorParser.GetDescription(rec, capExpr); string vars = xActorParser.GetVariables(rec, capExpr); return(new XTransitionActorSpawn(rec, desc, vars)); }