scritcher/src/printer.zig

53 lines
1.5 KiB
Zig
Raw Normal View History

2019-09-10 14:45:04 +00:00
const langs = @import("lang.zig");
pub fn printList(list: langs.CommandList, stream: var) !void {
for (list.toSlice()) |cmd| {
var command = switch (cmd.command) {
.Noop => "noop",
.Load => "load",
.Quicksave => "quicksave",
.RunQS => "runqs",
.Amp => "amp",
.RFlanger => "rflanger",
.Eq => "eq",
.Phaser => "phaser",
.Mbeq => "mbeq",
.Chorus => "chorus",
.PitchScaler => "pitchscaler",
.Reverb => "reverb",
.Highpass => "highpass",
.Delay => "delay",
.Vinyl => "vinyl",
.RevDelay => "revdelay",
2020-01-25 20:47:20 +00:00
.Gate => "gate",
2020-01-25 21:52:45 +00:00
.Detune => "detune",
.Overdrive => "overdrive",
.Degrade => "Degrade",
.RePsycho => "repsycho",
.TalkBox => "talkbox",
2020-01-26 01:45:37 +00:00
.DynComp => "dyncomp",
2020-01-26 02:32:24 +00:00
.ThruZero => "thruzero",
.Foverdrive => "foverdrive",
2020-01-26 03:03:15 +00:00
.Gverb => "gverb",
2020-01-26 03:13:53 +00:00
.Invert => "invert",
2020-01-26 03:28:59 +00:00
.TapeDelay => "tapedelay",
.Noise => "noise",
.WildNoise => "wildnoise",
.Write => "write",
.Embed => "embed",
.Rotate => "rotate",
2019-09-10 14:45:04 +00:00
};
2020-01-15 01:31:20 +00:00
try stream.print("{}", .{command});
2019-09-10 14:45:04 +00:00
for (cmd.args.toSlice()) |arg| {
2020-01-15 01:31:20 +00:00
try stream.print(" {}", .{arg});
2019-09-10 14:45:04 +00:00
}
try stream.write(";\n");
}
}