Commit d808920

Nick committed on
Fix wave codegen
commit d80892065c246d091d12b2ec2b92dee2e25d7683 parent 0372aba
1 changed files +6−2
Modifiedcodegen.pas +6−2
@@ -126,8 +126,12 @@ begin
126 SL := TStringList.Create; 126 SL := TStringList.Create;
127 SL.StrictDelimiter := True; 127 SL.StrictDelimiter := True;
128 SL.Delimiter := ','; 128 SL.Delimiter := ',';
129 for J := Low(Waves[I]) to High(Waves[I]) do 129
130 SL.Add(IntToStr(Waves[I][J])); 130 J := Low(Waves[I]);
131 while J < High(Waves[I]) do begin
132 SL.Add(IntToStr((Waves[I, J] shl 4) or Waves[I, J+1]));
133 Inc(J, 2);
134 end;
131 ResultSL.Add(Format('wave%d: db %s', [I, SL.DelimitedText])); 135 ResultSL.Add(Format('wave%d: db %s', [I, SL.DelimitedText]));
132 SL.Free; 136 SL.Free;
133 end; 137 end;