Commit 3ef832a

Nick Faro committed on
Automatically add pattern jump
commit 3ef832aee5f700a050e1dc1280528a793f4499d9 parent 852863b
2 changed files +7−4
Modifiedcodegen.pas +6−3
@@ -327,7 +327,7 @@ begin
327 SL.Free; 327 SL.Free;
328 end; 328 end;
329 329
330 function RenderTableCell(Cell: TCell): string; 330 function RenderTableCell(Cell: TCell; Last: Boolean): string;
331 var 331 var
332 SL: TStringList; 332 SL: TStringList;
333 begin 333 begin
@@ -340,7 +340,10 @@ begin
340 else 340 else
341 SL.Add(IntToStr(Cell.Note - MIDDLE_NOTE)); 341 SL.Add(IntToStr(Cell.Note - MIDDLE_NOTE));
342 342
343 SL.Add(IntToStr(Cell.Volume)); 343 if Last and (Cell.Volume = 0) then
344 SL.Add(IntToStr(1)) // Automatically insert jump back to row 1 if last cell
345 else
346 SL.Add(IntToStr(Cell.Volume));
344 347
345 SL.Add('$' + EffectCodeToStr(Cell.EffectCode, Cell.EffectParams)); 348 SL.Add('$' + EffectCodeToStr(Cell.EffectCode, Cell.EffectParams));
346 349
@@ -358,7 +361,7 @@ begin
358 SL.Add(Name + ':'); 361 SL.Add(Name + ':');
359 362
360 for I := Low(TPattern) to High(TPattern) do 363 for I := Low(TPattern) to High(TPattern) do
361 SL.Add(RenderTableCell(Pattern[I])); 364 SL.Add(RenderTableCell(Pattern[I], I = High(TPattern)));
362 365
363 Result := SL.Text; 366 Result := SL.Text;
364 SL.Free; 367 SL.Free;
ModifiedhUGEDriver +1−1
@@ -1 +1 @@
1 Subproject commit 4ade1eba36343954d9488090610562e52b494235 1 Subproject commit 83880547f81cf9df0cef179aff9332f1a625da80