Commit 9b945a2

Nick Faro committed on
fix highest waveform calculation for 9xx
commit 9b945a2bbbee447edecae63e0bb8359e844d4498 parent 5fc6c0a
1 changed files +2−2
Modifiedsrc/codegen.pas +2−2
@@ -64,7 +64,7 @@ begin
64 for Cell in Instr.Subpattern do 64 for Cell in Instr.Subpattern do
65 if Cell.EffectCode = $9 then begin 65 if Cell.EffectCode = $9 then begin
66 Waveform := Cell.EffectParams.Value; 66 Waveform := Cell.EffectParams.Value;
67 if Waveform > Result.HighestWaveform then 67 if InRange(Waveform, 0, 15) and (Waveform > Result.HighestWaveform) then
68 Result.HighestWaveform := Waveform; 68 Result.HighestWaveform := Waveform;
69 end; 69 end;
70 end; 70 end;
@@ -85,7 +85,7 @@ begin
85 for Cell in Pat^ do begin 85 for Cell in Pat^ do begin
86 if (Cell.EffectCode = $9) and (I = 2) then begin // waveforms on wave channel 86 if (Cell.EffectCode = $9) and (I = 2) then begin // waveforms on wave channel
87 Waveform := Cell.EffectParams.Value; 87 Waveform := Cell.EffectParams.Value;
88 if Waveform > Result.HighestWaveform then 88 if InRange(Waveform, 0, 15) and (Waveform > Result.HighestWaveform) then
89 Result.HighestWaveform := Waveform; 89 Result.HighestWaveform := Waveform;
90 end; 90 end;
91 91